Bombshell Disaster
Registered User.
- Local time
- Today, 09:08
- Joined
- Nov 21, 2007
- Messages
- 32
Hi Guys
Can you look at my code and tell me where I may be blind! HospitalSiteID is a text field and PatientID is an autonumber field. When I break the criteria down it is fine but when I have multiple criteria using And then I get the datatype mismatch error. I am thinking it may have something to do with the And operator and the quotes?
Many thanks
Can you look at my code and tell me where I may be blind! HospitalSiteID is a text field and PatientID is an autonumber field. When I break the criteria down it is fine but when I have multiple criteria using And then I get the datatype mismatch error. I am thinking it may have something to do with the And operator and the quotes?
Many thanks
Code:
Dim HospitalSiteID As String
Dim PatientID As Integer
Dim strCriteria As String
strCriteria = "[HospitalSiteID] = '" & HospitalSiteID & "'" And "[PatientID] = " & PatientID
rs.FindFirst strCriteria
...