DLookUp with Wildcard

Hudas

Registered User.
Local time
Today, 14:20
Joined
May 13, 2013
Messages
55
Hi Everyone...

I have to search the Filename field and return the value on HelpDeskNamefield on the Table1. The problem is the data on the Filename field contains only a portion of the value that I am searching. For example... I have 'majdatlate' that I need to search but the data on the Filename field only shows 'majda'. Another example... I have 'kjaooaq' that I need to search but the data on the Filename field only shows 'kjao'. Is this still even possible to use DLOOKUP here? Can someone please show me or give me an Idea please.

Thank you
Hudas
 
Use the function InStr.

DLookup("FieldNameToBeRetured", "TableNameToBeSearchIn", "InStr(1,'Text', [FieldNameWhichHasTheTextPart])"))
 
Thank you JHB it works this is what i did..

Code:
strHelpDeskName = DLookup("HelpDeskName", "t_job", "InStr(1,'" & strFilename & "',[Filename])")
 
You're welcome - luck with your project.
 

Users who are viewing this thread

Back
Top Bottom