Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running make table queries

Status
Not open for further replies.

randomGuy

Programmer
Sep 20, 2002
3
US
Using code how do I run a make table query?
 
MS Access 97:

An easy way to generate code is to create a Macro with the function you would like to accomplish. Then select the "SAVE AS/EXPORT" option under FILE. Select "SAVE AS VISUAL BASIC MODULE".
After that you may elect to include "ADD ERROR HANDLING TO GENERATED FUNCTION" and/or "INCLUDE MACRO COMMENTS".

The code now exists under MODULES as CONVERTED MACRO-macroname. From here you can copy/paste the code where you need it.

Hope this helps you in the future.
 
Uhh...problem is I cant find that action, that's why I asked for code...
 
Create the Query you want in design view - Test it to make sure it does what you want.

Then switch to SQL view and copy the code.

in your module use the command;
DoCmd.RunSQL "paste the SQL here;"
and hey presto you have your query in code.

Good luck Still new to DB's and enjoying learning day by day
 
OR:

Create the MAKE TABLE Query you want in design view - Test it to make sure it does what you want.

In you code, place:
DoCmd.OpenQuery "Make Table Query"

Still new to DB's and enjoying learning day by day - me, too!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top