Need Macro to run cross tab query and export to access table

  • Thread starter Thread starter Devon B
  • Start date Start date
D

Devon B

Can someone help me write an access macro that will delete records from a
table, run a query, add records to the table? I am trying to add the records
from a cross tab query to a table. This table is used in another query that
feeds a access report. Currently, we are manually running the coss tab
query, export the records to excel then import that excel sheet in to the
access table. I need to try and automate this as much as possible.
I am not sure how to do this, or how to put it all together.

Thanks,
DBrooks
 
Devon,

YOu can make a Delete Query to remove the existing records from the
table. You can make an Append Query, based on your existing crosstab
query, to add the new records to the table. You can use two OpenQuery
actions in your macro, one for the Delete and one for the Append.
 
Devon

Try RunSQL on the drop down box, then use the Insert Into. Example is below
The name of my data base is results that i want to into from results1. This
example is inserting all fields from results into results1 and both
databases are the same

INSERT INTO results SELECT results1.* FROM results1


danny
 
Back
Top