Use of LIKE in Expression Builder with variables (1 Viewer)

Shinta

Registered User.
Local time
Today, 00:57
Joined
Jan 11, 2012
Messages
48
Greetings:

I hope this is the correct place to ask for this. What I'm trying to do is to compare the result of a DLOOKUP with a value; this sentence is part of a field defined at the QUERY DESIGNER. It works fine as far as it is compared with a static value (a explicit String). My definition is as follows:

myValue: Sum(IIf(([field1]="Hello") And (DLookUp("field2","myTable"," ([field1]=""" & "Bye" & """) AND (field0 = " & [field0] & ")") Like "*myString*"),[field4]))

This is declared in the Expression Builder at the QUERY DESIGNER.


My wish is to be able to make the comparison DLOOKUP LIKE "*myString*" into a variable that would be input by the user when the query is ran.

I thank you in advanced any help and interest in this issue.

Best regards,

Javier
 
Last edited:

Ranman256

Well-known member
Local time
Today, 02:57
Joined
Apr 9, 2015
Messages
4,339
Don't use Dlookup in a query.
Use joins.
 

Users who are viewing this thread

Top Bottom