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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Multiple SQL at one time

Status
Not open for further replies.

luke418

MIS
May 21, 2001
4
0
0
US
Is there a way to run multiple SQL queries at one time. I have used a Access Macro which works great. I used the RunSQL in the macro. But now my problem is RunSQL is limited to amount of characters you can code 256. I just want to run the SQL's nine in all from a macro. I have nine tables each of which I have to import and run SQL against each table. I am trying to automate the process by running one marco to import the data into the nine different tables.

There has to be an easy way to run several SQL at once.

Luke418
 
You could run VB code and use the RunSQL method of DoCmd to execute SQL up to 32,768 characters long. You could run nine queries in one module. You can run the VB code from the macro if desired.

Example: DoCmd.RunSQL sqlstatement

You can also use the RunSQL action in the macro nine times if the queries are 256 characters or less.

Terry

The reason why worry kills more people than work is that more people worry than work. - Robert Frost
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top