C
Confused87
I have a search comand button and it works most of the time, excpet with one
name (so far) O'Shea. It comes up with the following error message:
Run- time error '2448' You can't assign a value to this object. The debugger
highlights this: Me.Filter = "[Surname] LIKE '*" & RetVal & "*'"
However othertimes, it says this:
Runt-time error '3075'
Syntax error (missing operator) in query expression "[Surname] LIKE
'*O'Shea*".
Any ideas? Here's the whole section:
Private Sub Command187_Click()
Dim RetVal As String
RetVal = InputBox("Enter Surname")
If RetVal <> "" Then
Me.Filter = "[Surname] LIKE '*" & RetVal & "*'"
Me.FilterOn = True
End If
End Sub
Many Thanks
C
name (so far) O'Shea. It comes up with the following error message:
Run- time error '2448' You can't assign a value to this object. The debugger
highlights this: Me.Filter = "[Surname] LIKE '*" & RetVal & "*'"
However othertimes, it says this:
Runt-time error '3075'
Syntax error (missing operator) in query expression "[Surname] LIKE
'*O'Shea*".
Any ideas? Here's the whole section:
Private Sub Command187_Click()
Dim RetVal As String
RetVal = InputBox("Enter Surname")
If RetVal <> "" Then
Me.Filter = "[Surname] LIKE '*" & RetVal & "*'"
Me.FilterOn = True
End If
End Sub
Many Thanks
C