Where Statment

  • Thread starter Thread starter Gary M Hull
  • Start date Start date
G

Gary M Hull

I am trying to open a report from a Command Button, and Apply a Filter

The following Code is not working.

The where Statement is giving me problems

DoCmd.OpenReport "repStateRunList", acViewPreview, , (((tblContestant.
[Male/Female] Like "f")))
 
The last argument needs to be surrounded with quotes.
Quotes inside quotes need to be doubled up.
Use the Equals operator where possible rather than the Like operator.

Try:

DoCmd.OpenReport "repStateRunList", acViewPreview, , _
"tblContestant.[Male/Female] = ""f"""
 
Gary M Hull said:
I am trying to open a report from a Command Button, and Apply a Filter

The following Code is not working.

The where Statement is giving me problems

DoCmd.OpenReport "repStateRunList", acViewPreview, , (((tblContestant.
[Male/Female] Like "f")))
 
Back
Top