Microsoft Office Tutorials and References
In Depth Information
Processing data with action queries
Processing data with action queries
Sec tion 7, “Modifying data using queries,” starting on page 117,
explains how action queries can update, insert, and delete data.
When you need processing that executes a sequence of action
queries, macros enable you to run those action queries to make
bulk changes to the data in your system.
changing the data. By using the Set Warnings macro, you can
switch off the prompting while the macro is executing.
In this example, we are going to use two action queries, first to
empty a table and then to populate the table with data.
The OpenQuery macro will either open and display the results of
a selected query or execute an action query with prompting for
Empty and populate a table of data
1 Create an action query to delete all the data in a table that you
regularly need to populate from another table of imported data.
2 Create an action query that will append a set of records from
another table to the same table from which you deleted all the
records. (We are going to assume here that you regularly import
data from another system into a table and that you then need to
further process that data into other tables in your database.)
(continued on the next page)
TIP When you are developing a stand-alone macro, you can
take advantage of the Run button on the far left of the ribbon
to execute your macro while staying in the design tool. You can also
click the Single Step button to allow execution of the macro one step at
a time.
Search JabSto ::

Custom Search