Where Statment

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")))
 
A

Allen Browne

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"""
 
G

Guest

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")))
 

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