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