Putting a Macro into a query

Huck

Registered User.
Local time
Today, 04:45
Joined
Jan 14, 2009
Messages
15
Hello. I'm trying to attach a macro to an update query and need to know first if this is possible and if so, how do I do it? Before the update query is ran, the user needs to ensure they have imported & appended new data to a table which then needs updating with a new date.
I've never used macros before but have managed to create a message box telling the user what they need to have done before they run this particular query. Now I need to attach the macro to the query!
I've a feeling it can't be done but am holding out some hope!
Thanks in advance for any assistance.
Huck
 
Anything is possible... but Macro to a Query?? I think you mean, you want to execute the query from the macro, or??

In the macro, if you want to execute sql find the "RunSQL" option.

Though anything worth doing is worth doing in VBA, not Macro's. VBA is so much more flexible etc...
in vba you would use Docmd.RunSQL or Currentdb.execute to execute SQL

Good luck !
 
Thanks Mailman - I'm not sure about using VBA but I'll give your suggestion a try. I want a message box to pop up before the query is ran to remind the user that they should import new data before running this particular query.
I'll let you know how I get on.
Huck
 

Users who are viewing this thread

Back
Top Bottom