Need help setting up a macro

  • Thread starter Thread starter kim wadsworth
  • Start date Start date
K

kim wadsworth

Guest
I have Table1, Table2, & Table3 already set up. I need to append all new records from Table1 to Table2. In also need to append these new records from Table1 to Table3 based on a 5-question criteria, (it is possible that some of the records from Table1 will not apply to any of the 5 questions, resulting in these records being appended to Table2 ONLY). I am taking an Access coarse in the near future, but I need to get this project up & running now. Any help is greatly appreciated.
 
Getting records from T1 to T2 is easy. Write a macro that contains an OpenQuery command that fires an Append Query appending T1 records, field for field, to T2. For the T1 to T3 piece, you could run a similar Append Query with criteria specified for the five fields involved in the test. If the test is different from what appears in the five fields, say you ask the user in a form to answer five questions and based on those answers you include or exclude each record, you might consider adding a yes/no field to T1, then after the user answers the questions, run a series of five queries that for each question, a query "turns on" the record only if the condition is met. Then, a final Append Query would collect up all the records with the yes/no field checked in and append only those records to T3. If you go this route, you should then write an Update Query to uncheck all the checkboxes, effectively cleaning up after yourself so all is clean for the next go-round.
 

Users who are viewing this thread

Back
Top Bottom