Assign Default Filter In Access Form


T

TGV

Hi,

I am Having a TABLE with USER ID,. DATE, PROCESS STATUS, TYPE & PERSON NAME
like that, based on that I have created a FORM in design view with USER ID,
DATE & PROCESS STATUS. USER ID is a TEXT BOX and i have assigned primary key
for User Id.

PROCESS STATUS is a COMBO BOX which is assigned by way of Lookup Wizard.
The PROCESS STATUS (Combo box) consist 3
options - OK, NOT OK & PENDING.

The form I have created is showing all the records that is OK, NOT OK &
PENDING Records. Here i want to set a default autofilter to filter the
PROCESS STATUS with PENDING records only. Whether
it is possible to apply any filter in the form to show only the PENDING
records and at the same time, if the users change the PROCESS STATUS from
PENDING to "OK" then the "OK" record should not be displayed in the form.
The users should be able to view only the PENDING records whether it is
possible?

Please advice…

TGV
 
Ad

Advertisements

B

Beetle

First, Date is a reserved word in Access an should not be used as
a field name. You should change the name to ProcessDate or
something like that. For more on reserved words see;

http://www.allenbrowne.com/AppIssueBadWord.html

Now on to your question. Create a new query that includes the
UserID, ProcessDate, and ProcessStatus fields from your table.
In the criteria row for the ProcessStatus field use criteria to
limit the records to only those that are Pending.

Use this new query as the Record Source for your form. In
the After Update event of the Status combo box put;

Me.Requery

The form will only display Pending records. If a user changes
a record to OK or Not OK, that record will be removed from the
displayed recordset. If I understand correctly that is what you
want.
 
Ad

Advertisements

T

TGV

Thank you very much for your reply. I got the answer from you what i have
expected.

Once again thank you....

TGV
 

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

Similar Threads


Top