Filtering a Datasheet

G

Guest

Hi,

I am looking for simple ways for my users to further refine their search
results in a datasheet using filters.

So far I have a QBF (query by form) set up to refine the records by two
fields, and then display the results in a datasheet. I then want my users to
be able to further refine their search using the "filter by form" option.

I have been informed that there is some way of making the "filter by form"
option automatically appear when the datasheet opens, but I have no idea how
to do this.

Can anyone help?
 
G

Guest

I assume that you are opening a form in datasheet view rather than simply
opening a query. In which case put the following in the form's Open event
procedure:

RunCommand acCmdFilterByForm

Ken Sheridan
Stafford, England
 
G

Guest

I have a form which is linked to a query via a macro. The results which
display are the results of the query.
 
G

Guest

I'm not quite clear. Is the macro opening a form bound to the query or is it
opening the query itself?

Ken Sheridan
Stafford, England
 
G

Guest

Hi,

The macro opens the query in datasheet view. The macro is then linked to a
command button on my form. Someone types in a query on the form page and hits
the command button which runs the query and displays the results. As I am not
very skilled at using Access I simply used the steps outlined by microsoft at
http://support.microsoft.com/default.aspx?scid=kb;en-us;304428

It works well but I want my users to be able to further filter their search
results without having to actually click the filter by form button in the
datasheet view.

Thank you

Louise
 
G

Guest

In that case all you need to do is to add an extra action to the macro. For
the Action select RunCommand and as the Command select FilterByForm. You
should then find the query will open with the datasheet already in filter by
form mode.

Ken Sheridan
Stafford, England
 

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