Report based off yes/no field

rcdugge

Registered User.
Local time
Today, 01:09
Joined
Jul 20, 2010
Messages
32
I have a search form which provides data and has a field yes/no check box. I also have a button "include" on the form which when clicked w any fields with a checked off box, will be sent to a report. However, I am having trouble doing this. I have tried using vba and for the button in the form, i have:

DoCmd.OpenReport "qrysearchreport", , , "[YesNoFieldName]=" & Val(Nz(Me.Answer, 2))

qrysearchreport being the name of the report

However, the report does not reflect any of the selected fields and instead prints the whole query.

Also, if possible, I would like whatever words that have been searched to also be inlcluded on the report.

How would I go about doing this and what issues do i have with this report? Thanks
 
Why not set the criteria in the query to the tick option you want?
 

Users who are viewing this thread

Back
Top Bottom