Dale Logan
asked on
Type Mismatch must by syntax
I really struggle with these situations where I need to use " or '. The line below is giving me a type mismatch error. Both variables are numeric. Where am I going wrong?
CurrentDb.Execute "UPDATE tblGoals SET TargetShare = " & Me.TargetShare & " where Crop_ID = " & Me.CurrentCrop And Location_ID = " & Me.CurrentLocation &"
CurrentDb.Execute "UPDATE tblGoals SET TargetShare = " & Me.TargetShare & " where Crop_ID = " & Me.CurrentCrop And Location_ID = " & Me.CurrentLocation &"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is any of below fields a character type?
TargetShare
Crop_ID
Location_ID
TargetShare
Crop_ID
Location_ID
CurrentDb.Execute "UPDATE tblGoals SET TargetShare = " & Chr(34) & Me.TargetShare & Chr(34) & " where Crop_ID = " & Me.CurrentCrop & " And Location_ID = " & Me.CurrentLocation