I am trying to do a lookup function in Access as I would use a Vlookup in Excel. I found the Dlookup expression but cannot seem to get it to work properly. I would like to use an expression and not VBA if at all possible.
I would like the expression to reference the below table (titled Search Strings) to insert the value from the "Current_Search_String" column into the criteria of another query.
Note: My character count will be below the 1024 limit in query design.
Search Strings
Attr_7 GUD Account_Name Current_Search_String
B72 123456789 ABC Company like "*abc*corp" or like "*abc*comp*" or like "*cba*" or like "acme *"
C72 987654321 XYZ Inc like "*xyz*corp" or like "*xyz*comp*" or like "*my company*"
I have tried the following expressions and none have worked...
DLookUp("[Current_Search_String]","[Search_Strings]","[Attr_7]=b72")
DLookUp("[Search_Strings]![Current_Search_String]","[Search_Strings]","[Search_Strings]![Attr_7]"="b72")
DLookUp("[Search_Strings].[Current_Search_String]","[Search_Strings]","[Search_Strings].[Attr_7]"="b72")
Please and thank you.
I would like the expression to reference the below table (titled Search Strings) to insert the value from the "Current_Search_String" column into the criteria of another query.
Note: My character count will be below the 1024 limit in query design.
Search Strings
Attr_7 GUD Account_Name Current_Search_String
B72 123456789 ABC Company like "*abc*corp" or like "*abc*comp*" or like "*cba*" or like "acme *"
C72 987654321 XYZ Inc like "*xyz*corp" or like "*xyz*comp*" or like "*my company*"
I have tried the following expressions and none have worked...
DLookUp("[Current_Search_String]","[Search_Strings]","[Attr_7]=b72")
DLookUp("[Search_Strings]![Current_Search_String]","[Search_Strings]","[Search_Strings]![Attr_7]"="b72")
DLookUp("[Search_Strings].[Current_Search_String]","[Search_Strings]","[Search_Strings].[Attr_7]"="b72")
Please and thank you.