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
 
Joined
Aug 7, 2012
Messages
10
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top