Why would an Access 2010 form button with an embedded "openreport" macro and a "where" filter, stop working until I add a new button?

Viewed 15

I decided to "tweak" an existing database to further manage multiple sources of income.

I copied the working database and created a "modification copy", just in case I messed things up horribly.

In the modified version, I have a button on a form (in fact, two different buttons with similar macro properties, just directed to do the same function to different reports.

The properties are your standard macro with an openreport, and a "where" condition.

picture of the macro build

Here's the problem. The macro has worked in the past, and continues to work on my "pre-modification" operating database.

On the modified database, after ensuring all the parameter elements are entered correctly, I can change the "view" to report view, and the macro seems to work just fine until I close the database.

As soon as I open the database, the buttons produce an error. See pic below.

Error message pic

The only way I seem to be able to resolve this odd button macro issue is by going into design view and adding a new button. I've discovered...I don't even need to embed a macro, just adding a new button seems to renew the macro operation...until I close and reopen the database. Then, I have to add a new button again to get the open database's macro to operate.

I can delete the new button added, and still have the macro buttons work, until I close and open the tweaked database.

I have zero VBA coding knowledge. I use Access's macro building tools and typically have to visit sites like this if I need to learn a new "trick" to get my database and it's various tools to do something.

I recently explored with the "subform" that can be seen above in the open form pic with the error message. My guess is that maybe that subform is somehow causing my macros to continuously fail???

Thanks for any help!

0 Answers
Related