Combo Box not working in query criteria

ambrn14

Registered User.
Local time
Today, 11:15
Joined
Mar 17, 2011
Messages
43
First, I am a novice to experienced beginner so bare with me.

I have a form that requires a start date and end date. I have made a combo box (on the same form) with list of the doctors to be selected as the criteria in a query. The query is not working. Here is the SQL:

"SELECT tblCodeStrokePts.CodeStrokeDate, tblCodeStrokePts.MRN, tblCodeStrokePts.ModeOfArrival, tblCSNeurologists.CSNeurologist, tblCodeStrokePts.PtIntubated, DateDiff("n",CDate([doordate] & " " & [doortime]),CDate([IVtPAStartdate] & " " & [IVtPAStarttime])) AS [Door to IV tPA]
FROM tblCSNeurologists INNER JOIN (tblCodeStrokePts INNER JOIN tblPatientCSNeurologists ON tblCodeStrokePts.CodeStrokeID = tblPatientCSNeurologists.CodeStrokeID) ON tblCSNeurologists.CSNeurKey = tblPatientCSNeurologists.CSNeurologist
WHERE (((tblCodeStrokePts.CodeStrokeDate) Between [Forms]![frmQuerySwitchboard]![txtStartDate] And [Forms]![frmQuerySwitchboard]![txtEndDate]) AND ((tblCSNeurologists.CSNeurologist)=[Forms]![frmQuerySwitchboard]![CSNeurologist]) AND ((tblCodeStrokePts.DoorDate) Is Not Null) AND ((tblCodeStrokePts.DoorTime) Is Not Null) AND ((tblCodeStrokePts.IVtPAStartDate) Is Not Null) AND ((tblCodeStrokePts.IVtPAStartTime) Is Not Null));"

I can not figure out what is wrong.:confused::eek:

I welcome any help that I can get. Thank you!
 
I forgot to say that my form has pages on it. I have a form header that holds the text boxes for the start and end date. Then pages for different reports and queries. I don't know if that has anything to do with this combo box criteria not working. :confused:
 

Users who are viewing this thread

Back
Top Bottom