Jan 31, 2002 #1 gharabed Programmer Sep 7, 2001 251 US Is there a way to dynamically (through VBA) set the SQL of an Access Query object?
Jan 31, 2002 #2 tomschafer Technical User Aug 9, 2001 474 US 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 Upvote 0 Downvote
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