vba coding a new query ?

T

tf

Hello

With vba, I create dynamically
a query using a string

like:
SQLstring = "select * from mytable where ... "

I ' d like to create the object in the database
from the code.

Do you know how to code that ?


Thanks
 
C

Cheryl Fischer

tf,

That would be a QueryDef. In VBA Help, check out the CreateQueryDef method.
When you use this method, you can optionally create a Temporary QueryDef by
not supplying a string value for Name, or you can pass a string value for
the Name of the QueryDef which will then save it as a query.

hth,
 

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