Error when applying a filter

N

Neil Crawford

Dear all,

I'd appreciate your comments on the error that appears
when I try to apply the following filter;-


Dim strcode As String
strcode = "[ContactID] = '10'"
Me.Filter = strcode
Me.FilterOn = True

I get the error message "You cancelled the previous
operation". I can't seem to work out why this is
appearing. I've tried the code in another database and it
works fine so it seems I must have something in my
current database that is causing this conflict. Any ideas?

many thanks,

neil
 
P

Peter

Dont have enough info, but at first glance:
Check the data type of the ContactID field. if it is a
number, remove the single quotes and try again.
 
N

Neil Crawford

Peter,

that worked, thanks,

Neil
-----Original Message-----
Dont have enough info, but at first glance:
Check the data type of the ContactID field. if it is a
number, remove the single quotes and try again.
-----Original Message-----
Dear all,

I'd appreciate your comments on the error that appears
when I try to apply the following filter;-


Dim strcode As String
strcode = "[ContactID] = '10'"
Me.Filter = strcode
Me.FilterOn = True

I get the error message "You cancelled the previous
operation". I can't seem to work out why this is
appearing. I've tried the code in another database and it
works fine so it seems I must have something in my
current database that is causing this conflict. Any ideas?

many thanks,

neil
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top