Filter Error

E

Evan McCutchen

Hello,

To allow my users to search for companies in our system, i have written a
query that filters our form "companies" for critera specified on the form
"companysearch". This works excellent until i want to remove the filter.
When i do this, using either the "DoCmd.ShowAllRecords" command or the
filter button on the roolbar, i receive a popup asking for the company name,
"tblCompanyContacts.CompanyName"... which shouldn't be happening - each time
i try to change a record after that, the pop up occurs, and eventually
access crashes.

Does anyone have any suggestions on how i might get around this? Thanks!

Evan McCutchen
evan AT radiologyonesource DOT com
 
G

GVaught

I believe at some point in your code you have to set the Filter to False and
then turn it back on when you need it. Also, there is a setting in the
properties of the form where you can set 'Allow Filter' to No. This seemed
to stop that popup when I had this problem in a form created by someone
else.

Rather than use a filter, why not create a parameter query and placing the
statement:
Like [Enter Company Name] & "*" in the criteria section. This will allow the
user to partially type the company name or just press enter to see all
records?
 
E

Evan McCutchen

Thanks for your reply. I still can't get the filter thing to work.

How would i go about creating the paramater query that you mentioned ?

Evan McCutchen
evan AT radiologyonesource DOT com

GVaught said:
I believe at some point in your code you have to set the Filter to False and
then turn it back on when you need it. Also, there is a setting in the
properties of the form where you can set 'Allow Filter' to No. This seemed
to stop that popup when I had this problem in a form created by someone
else.

Rather than use a filter, why not create a parameter query and placing the
statement:
Like [Enter Company Name] & "*" in the criteria section. This will allow the
user to partially type the company name or just press enter to see all
records?

Evan McCutchen said:
Hello,

To allow my users to search for companies in our system, i have written a
query that filters our form "companies" for critera specified on the form
"companysearch". This works excellent until i want to remove the filter.
When i do this, using either the "DoCmd.ShowAllRecords" command or the
filter button on the roolbar, i receive a popup asking for the company name,
"tblCompanyContacts.CompanyName"... which shouldn't be happening - each time
i try to change a record after that, the pop up occurs, and eventually
access crashes.

Does anyone have any suggestions on how i might get around this? Thanks!

Evan McCutchen
evan AT radiologyonesource DOT com
 

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