Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    79

    Unanswered: Accessing file twice with different keys

    I have a file that contains address information. I am creating an invoice report that needs to access this address info. I have the address number that represents the shipper and the address number that represents the consignee. I need to get the actual address information to display on the invoice. I was using DLookUp.

    =DLookUp("[CustName]","tblShp/Cons","[CustNumber]=[Shipper]")

    that works fine but I also need to look up for consignee

    =DLookUp("[CustName]",tblShp/Cons","[CustNumber]=[Consignee]")

    I am not getting any results for this second lookup - no errors - just blank.

    Is there a different way that I can do this?

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    Code:
    =DLookUp("[CustName]",tblShp/Cons","[CustNumber]=[Consignee]")
    I see you forgot an " while typing table name. can this be the problem?
    ghozy.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    use " AND " to concatenate your requisite criteria:

    =DLookUp("[CustName]","tblShp/Cons","[CustNumber]=[Shipper] AND [CustNumber]=[Consignee]")
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •