Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Sep 13, 2023
Solved

#Error in Query (nulls?)

Hello Experts, I am getting a #error in the below, I do have nulls on the Reference.  How could I solve this issue?  Not sure if its due to [Reference] having nulls.       WDDateGetError: DLookUp(...
  • Karl_Donaubauer's avatar
    Karl_Donaubauer
    Sep 14, 2023

    Hi Tony,

     

    > the format is short text for both of those fields. 

     

    Ok, then I misunderstood your description. I thought you were getting the error only for some records. With this information it is clear that you should get the error for every record because the syntax for text is different than for numbers. You have to put the text parameter in quotation marks:

     

    WDDateGetError: DLookUp("MaxOfWithdrawalDate","qryWDDate","Reference = '" & [Invoice No] & "'"

     

    [edited after XPS35 spotted the wrong column/field name]

     

    Servus
    Karl
    ****************

    Access Forever

    Access News
    Access DevCon

    Access-Entwickler-Konferenz AEK