Hi, I have a hard time in trying to figure out on how to create a macro on doing a routine repeatedly so that I do not have to execute the SQL in Tools->SQL repeatedly.
I have 2 tables. “Container” and “NEW”. I do not input data directly into Container but via NEW table.
My SQL is :
INSERT INTO “Container”(“Cont_ID” ) SELECT “Cont_ID” FROM “NEW”
WHERE “NEW”.“Cont_ID” IS NOT NULL;
DELETE  FROM “NEW”
I can successfully insert new records into Container table and clear all data in NEW table with above SQL.
What I am planning is to include a button in my NEW Form where I can press to execute the above SQL command to update my Container table and then clear up all data in NEW table for next update.
I have read a lot about macro but I can’t really understand the basic.
Hope someone can help me on a sample of this macro.
Thanks so much in advance.
EDIT by @Hrbrgr - Screaming off
 
      
     (upper left area of answer).  It helps others to know there was an accepted answer.
 (upper left area of answer).  It helps others to know there was an accepted answer.