Full Version: Open a form showing only certain records from a table
UtterAccess Forums > Microsoft® Access > Access Forms
nokose451
I am trying to set up a form so when it is accessed it will display only records matching a certain criteria.
Here is an example:
We are trying to set up a linked database to only show records for items that have not been approved. So when this person approves them they will no longer see that record.
Hope this makes sense and any help would be appreciated.
Thx.
R. Hicks
Welcome to Utter Access Forums ... frown.gif
You filter the records by using a query for the form and set the criteria to return only the specific records ...
RDH
KenSheridan
Base your form on a query which restricts the rows returned to those not approved. Lets assume the table includes a Boolean (Yes/No) column, Approved then the query would be something like this:

SELECT *
FROM MyTable
WHERE NOT Approved;

To remove the record from the form immediately if a user changes the Approved field from False to True you need to requery the form with code in the form's AfterUpdate event procedure:

CODE
If Me.Approved Then
nbsp;   Me.Requery
End If

Edited by: KenSheridan on Tue Dec 27 17:43:40 EST 2005.
nokose451
OK I have foiund the filter but am at a lose of how to set the function to do that.
nokose451
Ok I have tried both of those and they do not appear to be wroking please help....
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.