You probably do need a query. Just go ahead and use query builder to create it. Then switch to SQL view to see the Select statement built by that query. Then replace the Select statement in your code.
As an alternative...
Set up the query such that the Criteria of agcyID has a unique value that will never appear elsewhere in the select statement, e.g. <Set Agency>.
Then in your code...
SQLStatement:=Replace(CurrentDB().QueryDefs("your_ query_name").SQL,"<Set Agency>",intAgency)
Then if you change the query, you don't have to change your code.
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org