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

Dynamic Access Query Objects

Status
Not open for further replies.

gharabed

Programmer
Sep 7, 2001
251
US
Is there a way to dynamically (through VBA) set the SQL of an Access Query object?
 
This should help to get you in the right direction.

Dim qry_Query As QueryDef
Dim str_SQL As String

Set qry_Query = CurrentDb.QueryDefs("QueryName")

str_SQL = "select name from msysobjects where type="

qry_Query.SQL = str_SQL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top