Code to execute a make table query

J

Jim Pockmire

I have a make table query that I want to loop through from a list of
criteria values in another table. Is it possible to do this without using
the CreateQueryDef method (the sql select statement is 500+ characters
long)?
 
A

Alex Dybenko

If you need to execute SQL - you can just pass it to CurrentDb.Execute
method, or docmd.RunSQL method
 
J

Jim Pockmire

In either of the methods below is there a limitation to the length of the
SQL string? The select statement is over 500 characters.
 
A

Alex Dybenko

as i remember - statement limit is about 2000 characters
So - do you have problems running it?
 
J

Jim Pockmire

It works fine. I needed to copy the sql from the query into several strings
in the module, and then do some editing.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top