Run Macro On Open event for report and SetValue Macro has wierd error

  • Thread starter ThompsonJessical
  • Start date
T

ThompsonJessical

I have a database that I am updating so I copied the database and
pasted as new file to play with. A macro that works fine in the
original database (sets the value of the forms visible property to
false upon clicking an OK button in order to run a report with the
users criteria) is not working in the copied version. I have the macro
set to run on the open event of the report. I get the following error
"The expression you entered has a function name that Microsoft Access
can't find" It then runs the report as I wanted it to with the correct
criteria. I can't figure out why this error is popping up. I have
tried writing the VB code to set the forms visible property to false
instead of using the macro as well, but I am still getting the same
error. When I run the macro from the macros screen and click the OK
button, I do not get an error. I only get the error when I run the
report. Any suggestions?
 

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