Results 1 to 2 of 2

getting a value from textbox to the table.

  1. #1
    MMcKenna is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    2

    getting a value from textbox to the table.

    I thought this was going to be simple but it is not coming together. I have a textbox on a form that was tied into my table as a control source. No issue there. I then changed the control source for the textbox to:
    Code:
    =DMin("CertEndDate","3rdPartyList","SupplierRecord=" & Forms!Primary!SupplierRecord)
    This gets me the value I am looking for which is derived from the lowest date from a subform list. The problem I have now is that the value is not tied into the table.

    I tried changing the textbox control source back to the table field and adding this to an event but it was a no go.
    Code:
    =Forms!Primary!EarliestExpiration=DMin("CertEndDate","3rdPartyList","SupplierRecord=" & Forms!Primary!SupplierRecord)
    Essentially I need to take the lowest date from a subform, display it on the parent form and write that value to the form source table.

    Any thoughts on a simple way to do this?

    -Matt

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    12,236
    I probably wouldn't save it (calculated value violation of normalization rules), but the code would be:


    Forms!Primary!EarliestExpiration=DMin("CertEndDate ","3rdPartyList","SupplierRecord=" & Forms!Primary!SupplierRecord)

    In other words, no "=" at the beginning.
    Paul (wino moderator)
    MS Access MVP
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Adding Textbox value into Table
    By sikhinvestor in forum Access
    Replies: 2
    Last Post: 06-05-2014, 06:29 AM
  2. Place a table value in a textbox
    By justhininabouti in forum Programming
    Replies: 2
    Last Post: 11-26-2011, 08:56 PM
  3. Replies: 3
    Last Post: 09-20-2011, 10:54 AM
  4. Replies: 3
    Last Post: 08-18-2011, 06:31 AM
  5. Writing data from textbox to table
    By mll in forum Forms
    Replies: 4
    Last Post: 03-10-2010, 03:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums