I am trying to set the rowsource of a LisBox
This works in a query
Code:
SELECT TBLRECORDS.RecordsID, TBLRECORDS.FileID, DCount("RecordsID","TBLRECORDS","RecordsID <= " & [RecordsID]) AS Expr1, TBLRECORDS.Internal, TBLRECORDS.Processed
FROM TBLRECORDS
WHERE (((TBLRECORDS.FileID)="51"));
but throws a Compile error expected end of statement at DCount("RecordsID" when I put it into a Dim'd statement
Code:
strLstOrders="SELECT TBLRECORDS.RecordsID, TBLRECORDS.FileID, DCount("RecordsID","TBLRECORDS","RecordsID <= " & [RecordsID]) AS Expr1, TBLRECORDS.Internal, TBLRECORDS.Processed From TBLRECORDS WHERE (((TBLRECORDS.FileID)="51"));"