DCount and Wildcards

Tiro Cupidus

Registered User.
Local time
Today, 17:50
Joined
Apr 25, 2002
Messages
263
I have a text box with a control source similar to this:

=DCount("[FieldName]","TableName","[FieldName] = '*nm*'")

There is apparently something wrong with the syntax because I get a return of 0. When I run a query with these parameters I get over 200 results. So I guess I need to know where to place wildcard characters in the DCount function... or can you use them at all?
 
Try This...

DCount("[FieldName", "TableName", "[FieldName] Like '*" & nm & "*'")
 
Thank you very much! All I needed to do was replace the '=' with 'Like'... *smacks self on forehead* =D

=DCount("[FieldName]","TableName","[FieldName] Like '*nm*'")
 

Users who are viewing this thread

Back
Top Bottom