LarryDeLaruelle
Technical User
I have an sql statement to select records from a subordinate table based on a match of record number and a no condition on a check box:
The assignment looks like this:
strSQL = "SELECT AppID, Scored FROM tblTests WHERE (((AppID)= '" & cboSelect & "') AND ((Scored)=No));"
The actual string looks like this:
SELECT AppID, Scored FROM tblTests WHERE (((AppID)= '2001008') AND ((Scored)=No));
I have two records in the table for this AppID. If I set the Scored to Yes for both, no records are found and the RecordCount is zero. However, if I uncheck one of the records (one only) the RecordCount then is two instead of one. If I uncheck both, the RecordCount is still two.
I have copied the string to a blank query and pasted it and it works fine -- returning the correct number of records based on what I check/uncheck.
This is driving me crazy. Any ideas on what is happening here and what I need to do to correct it?
Thanks.
Larry De Laruelle
larry1de@yahoo.com
The assignment looks like this:
strSQL = "SELECT AppID, Scored FROM tblTests WHERE (((AppID)= '" & cboSelect & "') AND ((Scored)=No));"
The actual string looks like this:
SELECT AppID, Scored FROM tblTests WHERE (((AppID)= '2001008') AND ((Scored)=No));
I have two records in the table for this AppID. If I set the Scored to Yes for both, no records are found and the RecordCount is zero. However, if I uncheck one of the records (one only) the RecordCount then is two instead of one. If I uncheck both, the RecordCount is still two.
I have copied the string to a blank query and pasted it and it works fine -- returning the correct number of records based on what I check/uncheck.
This is driving me crazy. Any ideas on what is happening here and what I need to do to correct it?
Thanks.
Larry De Laruelle
larry1de@yahoo.com