Change a query

W

Warrio

Hello!!

Is it possible to modify the Sql text of an object query stored in the
database (by code)?

Thanks for any suggestion!
 
W

Wayne Morgan

Yes.

CurrentDb.QueryDefs("MyQuery").SQL = "SELECT * FROM ....."

This can be shortened if you have already defined a querydef object
variable.

qdf.SQL = "SELECT ..."
 

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