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!

Check for existing query

Status
Not open for further replies.

Pamy

MIS
Oct 15, 2002
29
SG
Hi,

I need to run different SQL statement in the same query. And this is what i have coded.

Set db = DBEngine(0)(0)
strSQL = "Select * from XXX"
Set qdf = db.CreateQueryDef("QryApplicant", strSQL)

The code execute for the first time, but failed on the second attempts. I supposed because there is already existing query in the database. How can i overwrite the SQL statement without deleting the existing Query.

Thanks you and Merry X'Mas
 
Hiya,

You've tried:

strSQL = "Select * from YYY"
Set qdf = db.CreateQueryDef("QryApplicant", strSQL)

And it doesn't work?

Regards,

Darrylle

"Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top