You're correct that strSearch is not picked up from the form which is why I assigned the value to a text box and referenced the text box in the msgbox.
Both the msgbox and the variable worked when there was no data until I changed the .visible mode of the calling form from the Form_open event.
Jo
Thank you Remou!
I had considered the option of using the calling form but am unsure how to code for it. I have an on error event for the button to trap a 2501 error but it doesn't fire.
The message is coded in the No Data event of the report. The msgbox comes up but the variable is empty...
I have a calling form that contains a textbox holding search terms.
1) If the report has data, the search terms print out on the reports' unbound text box.
2) When the report opens, I set .visible for calling form to false.
3) If there is no data, I want the search terms to appear in a msg...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.