Data Type mismatch in expression

Prysson

Registered User.
Local time
Today, 18:26
Joined
Sep 23, 2002
Messages
45
Here is my query


.Open "SELECT tblLocation.*, tblArea.* FROM tblArea INNER JOIN tblLocation ON tblArea.LocationID = tblLocation.LocationID WHERE tblLocation.LocationID =’” & Me!cmbLocation & “’ & tblArea.AreaName =’” & Me!txtArea & “’;"

I suspect that the problem is because the Me!cmbLocation is actually a Long Integer value....not sure how to fix the problem though.
 
Assuming tblLocation.LocationID is numeric, try this:-

.Open "SELECT tblLocation.*, tblArea.* FROM tblArea INNER JOIN tblLocation ON tblArea.LocationID = tblLocation.LocationID WHERE tblLocation.LocationID =" & Me!cmbLocation & " and tblArea.AreaName ='" & Me!txtArea & "';"
 

Users who are viewing this thread

Back
Top Bottom