Hello,
Im having a problem sending multiple items from a lstbox to a query.
The query is QueryDef, and the SQL is below.
Criteria is the data from the lstbox.
I've put a msgbox it which shows my lstbox (Criteria) giving me 48 or 49 Or 50 (which is what I expect).
When I run the query, it creates as normal with Ref = 48, but the 49 and 50 are being added as column headers and <>false as criteria.
Can anyone see what im doing wrong?
Thanks
Im having a problem sending multiple items from a lstbox to a query.
The query is QueryDef, and the SQL is below.
Criteria is the data from the lstbox.
I've put a msgbox it which shows my lstbox (Criteria) giving me 48 or 49 Or 50 (which is what I expect).
When I run the query, it creates as normal with Ref = 48, but the 49 and 50 are being added as column headers and <>false as criteria.
Can anyone see what im doing wrong?
SQL = "SELECT tbl_Table.Ref FROM tbl_Table HAVING (((tbl_Table.Ref)=" & Criteria & "));"
Thanks