When I use the following code, 2 out of three times, it works fine and filters the form to the field specified, but occasionally I'll get a Run time error 2001: You canceled the previous operation.
Any thoughts? I'm kind of puzzled as to why it works sometimes, and not others.
Private Sub cboProjectNumber_AfterUpdate()
On Error GoTo Err_cboProjectNumber_AfterUpdate
Dim sql As String
Dim Fieldname As String
Dim FieldValue As String
Fieldname = "PROJECT_NUMBER ="
FieldValue = cboProjectNumber.Value
sql = Fieldname & Chr(34) & FieldValue & Chr(34)
Forms!frmProjectDetail.Filter = sql
Forms!frmProjectDetail.FilterOn = True
Thanks in advance for any feedback. This one's been bugging me for a while.