Filtering Records in Reports and forms...

C

Clarence

I have a DB that keeps track of printers that are in need
of repair for our facility...

On a form there is a field that lists the status of the
printer. based on that status I want to either include the
record in the form or exclude it from the form...

So if the STATUS field shows ANYTHING other than CLOSED -
INVOICE PAID, that record shows in the list of records for
this form.... If it shows CLOSED - INVOICE PAID then it is
not shown and I also want that particular record deleted
from the table and placed in a Closed Records table....

Additionally I have a button on the form that prints
current records and another that prints a detail of all
records....I don't want records whose status is Closed to
show on that report either.

I hope this makes sense....I'm using Access 2003

Thanks,
Clarence
 
R

Rebecca Riordan

All you need do is create a Query with the criteria:

<> "CLOSED - INVOICE PAID"

in the criteria cell of the Status field. Use that query as the record
source for your forms and reports.

To move the record, you'll need to create two additional Queries. One that
copies the records to the ClosedRecords table, and one that deletes them
from the primary table. This time, use the criteria:

= "CLOSED - INVOICE PAID"

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 

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