Dcount with matching a part of text criteria

Joined
Aug 5, 2012
Messages
2
Reaction score
0
I NEED HELP SINCE I TRAY TO USE THIS CODE with matching a part of text criteria.
BUT IT GIVE ME WRONG ANSWER

=DCount("[status]","all open woq","[department]= 'shom*'")
WERE THE SHOM* REFERE TO A PART OF TEXT
TAHNKS
 
Start again:
Dim strParameter as string
strParameter ="shom"

Try ...."[department] = " & strParameter &"*")


Good practices pay out in the end:

Your field should be called fldStatus

Your table/query should be called tabAllOpenWog/qryAllOpenWog
NoSpaces= Less Problems
or even better a constant, whose content can be changed when the table/query name changes

Your department should be a number like DepartmentId, you need a tabDepartment that with the corresponding hierarchy.

Rgds Vold
 
Back
Top