I am trying to set date limiting criteria. I have a option group which based on the selected option sets the txtCriteria to either =, , <=, or AND. Also it displays one or two text boxes, txtRosterStart or txtRosterEnd. That all works correctly. I now need to retrive and use the txtCriteria, txtRosterStart, or txtRosterEnd. Here is where the trouble begins. I have the follow SQL the WHERE line is the issue.
SELECT tblCombinedRegistration.LearnerID, tblCombinedRegistration.ClassName, tblCombinedRegistration.ClassNumber, tblCombinedRegistration.ClassID, tblCombinedRegistration.CancelledNoShow, tblCombinedRegistration.DateTimeRegistered, tblCombinedRegistration.DateOfClassStart, tblCombinedRegistration.ISDateOfClassStart, tblCombinedRegistration.Grade
FROM tblCombinedRegistration
WHERE (((tblCombinedRegistration.DateOfClassStart)=[Forms]![frmReports]![txtCriteria] & [Forms]![frmReports]![txtRosterStart]));
The above Where gives me the error message: It is typed incorrectly (I used the builder) or to complex.
The following does work. WHERE (((tblCombinedRegistration.DateOfClassStart)=[Forms]![frmReports]![txtRosterStart]));
Any help or direction would be appreciated. Thank you. Fay