R
RipperT
An unbound cboBox has this After_Update code behind it.
Private Sub cboNameLookup_AfterUpdate()
Me.Filter = "LstName = '" & Me.cboNameLookup & "'"
Me.FilterOn = True
If Me.RecordsetClone.RecordCount = 0 Then
Me.FilterOn = False
MsgBox " Name not found."
End If
End Sub
If the user types an apostrophe into it, I get the following runtime error:
Run time error '2448':
You can't assign a value to this object.
What can I do to prevent this?
Many thanx, Rip
Private Sub cboNameLookup_AfterUpdate()
Me.Filter = "LstName = '" & Me.cboNameLookup & "'"
Me.FilterOn = True
If Me.RecordsetClone.RecordCount = 0 Then
Me.FilterOn = False
MsgBox " Name not found."
End If
End Sub
If the user types an apostrophe into it, I get the following runtime error:
Run time error '2448':
You can't assign a value to this object.
What can I do to prevent this?
Many thanx, Rip