Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010
    Posts
    22

    Arrow DLookup to populate form

    I have the following DLookup statement:



    =DLookUp("[Repair Directory]![TAT]","[Repair Directory]",("[Repair Directory]![PartNumber]=[forms]![QuoteLineItems2]![combo17]" And "[Repair Directory]![RepairDes]=form![QuoteLineItems2]![Combo25]"))

    My goal is to have Access observe on the form (QuoteLineItems2) what was input into Combo17 and Combo25, then based on that combination fill in the TAT(from table Repair Directory). I can get it to work as a Select statement with a combo box, but then the user must choose the TAT (there is only one piece of data) and it does not auto-populate.

    When I run the DLookup above it inputs the first field of the table (Repair Directory) every time.

    Any suggestions?

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    if partnumber is a text field and [repair directory] is a text field:
    =DLookUp("[Repair Directory]![TAT]","[Repair Directory]","[Repair Directory]![PartNumber]='" & [forms]![QuoteLineItems2]![combo17] & "' And [Repair Directory]![RepairDes]='" & form![QuoteLineItems2]![Combo25] & "'")


    if partnumber is a number field and [repair directory] is a text field:
    =DLookUp("[Repair Directory]![TAT]","[Repair Directory]","[Repair Directory]![PartNumber]=" & [forms]![QuoteLineItems2]![combo17] & " And [Repair Directory]![RepairDes]='" & form![QuoteLineItems2]![Combo25] & "'")

  3. #3
    Join Date
    Sep 2010
    Posts
    22
    Thank you weekend00!

    Is there any reading on the web you would suggest to help me understand how the "&" works?

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

Similar Threads

  1. Replies: 63
    Last Post: 01-25-2013, 05:20 AM
  2. Pre populate a second form
    By sliminconcoova in forum Forms
    Replies: 3
    Last Post: 09-01-2010, 08:34 AM
  3. Dlookup in form returns #error
    By RickM in forum Access
    Replies: 1
    Last Post: 03-29-2010, 07:59 PM
  4. Form Dlookup macro
    By lukekelly in forum Forms
    Replies: 2
    Last Post: 01-20-2010, 06:24 AM
  5. Replies: 1
    Last Post: 08-14-2009, 08:41 AM

Posting Permissions

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