I have a screen that has three fields Category, Campaign, CamType these three fields are a unique index for a table. I query the table to ensure the user entered a unique value before I try to update the table. I get this error.
strFilter = "CatId = '" & Me!txtCategory & _
"' AND Campaign = '" & Me!txtCampaign & _
"' AND CamType = '" & Me!txtCamType & "'"
strCam = DLookup("Campaign", "Campaign", strFilter
Syntax error (missing opertor) in query expresion 'CatId = 'CAT-1' AND Campaign = 'ADB' AND CamType = 'Jim's"
Is there a way to strip out the apostrophe, or is there a better way that will allow them to keep the apostrope?
strFilter = "CatId = '" & Me!txtCategory & _
"' AND Campaign = '" & Me!txtCampaign & _
"' AND CamType = '" & Me!txtCamType & "'"
strCam = DLookup("Campaign", "Campaign", strFilter
Syntax error (missing opertor) in query expresion 'CatId = 'CAT-1' AND Campaign = 'ADB' AND CamType = 'Jim's"
Is there a way to strip out the apostrophe, or is there a better way that will allow them to keep the apostrope?