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

retriev sql from query

Status
Not open for further replies.

europed

Programmer
Sep 4, 2003
2
ES
Is there a way of retrieving the SQL code from a existing query in access using VBA and than modifying the sql to create another similar query? Thanx,
 
Well SQL is a property of the querydef object so I would say so

mySQL = querydefs("QueryName").SQL

should work nicely

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top