• DLookup error (Access 2000)

    Author
    Topic
    #363146

    Syntax error in DLookup

    I have a table called Affiliates, and want to lookup the city depending on the field afid which is autonumber in the table.This field afid is available also on the report called Invoice.I want the following.If the control afid on the report is 1, then to look up for the city in the table Affiliates,where afid = 1.
    If afid is 2, then to look up for the cisty where afid = 2

    I have placed the following in the control on the report:

    DLookup(“[City]”, “Affiliates”, ” Me! [afid] = ” & 1)
    However i receive the following error :

    runtime error 3075, Syntax error (missing operator) in query expression
    I have also tried the following
    DLookup(“City”,”Affiliates”,afid=1)

    But again without success.

    May i have some further help?

    Viewing 0 reply threads
    Author
    Replies
    • #553494

      Hi,
      I think you want this:
      DLookup(“[City]”, “Affiliates”, “[afid] = ” & Me!afid)
      Hope that helps.

    Viewing 0 reply threads
    Reply To: DLookup error (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: