I have a query with a nested query in it like so:
select table1.name, table1.address
and table1.name not in
This crashes Access every time. Am a doing something that isn't allowed?
Best How To :
I was able to get it to work by using VBA to build my query.
Essentially I wrote a function that sets rs=db.OpenRecordset("my subquery")
Then iterates through rs, and appends it to a string like so:
Do Until rs.EOF
string=string & "'" & rs.Fields(0) & "', "
if string <> "" then string=Left(string,len(string)-2)
strSQL="select table1.name, table1.address from table1 where table1.year=forms]![form1]![year] and table1.name not in (" & string & ")"
Then during my afterupdate event
Everything works now