another idea is to use a temporary table which stores a userid and a primary
key of your search table (e.g. org).
Like that you can easily insert
s = "insert into temptable (userid, orgid) " & _
"select " & userid & ", orgid from org where [your condition]"
currentdb.execute s
afterward it's easy (and quick) to select the needed records from your table
s = "select * from org inner join temptable on temptable.orgid = org.id
where temptable.userid = " & userid
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.