Hi. I have a combobox OnChange event which should update a form's datasource
base on the combobox's value in Colum1. Code is below. But when this code
executes I get the error "Run-time error '2001': You canceled the previous
operation."
Private Sub FilteredContacts_Change()
Me.Form.Filter = "[Contact_ID] = '" & FilteredContacts.Column(1) & "'"
Me.Form.FilterOn = True
End Sub
What am I doing wrong or how do I fix this?
Thanks!
That very misleading error message often occurs when you've misspelled the
name of a field in your statement.
Are you sure that the name of the field in the form's underlying recordset
is Contact_ID and not, say, ContactID or Contact ID?
Are you sure that it's a text field, and not a numeric field?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Hi. I have a combobox OnChange event which should update a form's
> datasource
[quoted text clipped - 11 lines]
>
> Thanks!