I am wanting to return all records in an Access table that meet a query criteria.
The query I have built via VBA code is -
SELECT ID, Price, QtyOut, ValueOut, InStock, ValueInStock, Allocated FROM GoodsIn WHERE Item = '9oz Squat Plastic Cup' AND DateIn <# 22/08/2019# AND Allocated = False ORDER BY DateIn ASC, QtyIn ASC
There are 2 records in the table that meet the criteria but the query is only returning 1 record.
I am using the following to open and read the recordset
I have used this code before to return all matching records so I am at a bit of a loss as to why this is n't working.
Any insights provided would be hugely appreciated.
TIA
The query I have built via VBA code is -
SELECT ID, Price, QtyOut, ValueOut, InStock, ValueInStock, Allocated FROM GoodsIn WHERE Item = '9oz Squat Plastic Cup' AND DateIn <# 22/08/2019# AND Allocated = False ORDER BY DateIn ASC, QtyIn ASC
There are 2 records in the table that meet the criteria but the query is only returning 1 record.
I am using the following to open and read the recordset
Code:
rsQuery.Open strQuery, cnConnection, adOpenKeyset, adLockOptimistic
I have used this code before to return all matching records so I am at a bit of a loss as to why this is n't working.
Any insights provided would be hugely appreciated.
TIA