Hello All,
I would like to run an Update Query from a Macro. I want to run the Macro using the ON LOAD Event of a report. I look at all of the Actions within the Macro Builder but did not find a way to do it. Please Help...
Hello All,
I would like to run an Update Query from a Macro. I want to run the Macro using the ON LOAD Event of a report. I look at all of the Actions within the Macro Builder but did not find a way to do it. Please Help...
I don't use macros, but I think you want OpenQuery. If it's not visible, you may need to click on Show All Actions on the ribbon.
I saw the OpenQuery Action. I did not see an option for it to automatically run. I don't have to use a Macro. If you know how to run the Update Query using a Macro or using VBA, please let me know.
In VBA it would be CurrentDb.Execute or DoCmd.OpenQuery. To get your macro to run automatically, you would call it from the on load event. Same with code.
Thank you pbaldy. I will try what you suggested...
Michael...
No problem, let me know how it goes.
pbaldy,
I used the following command with the OnOpen Event for a report and it worked like a charm.
DoCmd.Openquery "UpdateQuery"
Thanks again...
Glad it worked for you.