Can I create an Access form containing specified records of a tab.

D

dj_marie21

Microsoft Access 2002.

I want to create a form that only shows records in a table that meet the
criteria of a certain field, not one that shows all the records in a table.

Example: table fields include name and sex (2 options). Can I create two
forms based on the same table, but one form only shows records matching
sex=1, and the other form only shows records matching sex=2?
 
P

Paul James

You could easily accomplish this by basing your forms on queries rather than
tables.

Create two queries based on your table, each containing criteria for the
field (in this case, sex) that specify the values you want to appear in your
form. Then use those queries as the record sources for your forms.

Another way to do this is to build only one form, and filter the records in
the form using any of the various filtering methods available in Access.
But even in that case, it's still best to base the form on a query rather
than a table, even if you simply create a query that contains all the fields
in the table. It will look just like the table, but you have a lot more
control over the data with criteria, sorting, and more.

HTH

Paul
 
T

Thank you!

Thank you!

-dj_marie21

Paul James said:
You could easily accomplish this by basing your forms on queries rather than
tables.

Create two queries based on your table, each containing criteria for the
field (in this case, sex) that specify the values you want to appear in your
form. Then use those queries as the record sources for your forms.

Another way to do this is to build only one form, and filter the records in
the form using any of the various filtering methods available in Access.
But even in that case, it's still best to base the form on a query rather
than a table, even if you simply create a query that contains all the fields
in the table. It will look just like the table, but you have a lot more
control over the data with criteria, sorting, and more.

HTH

Paul
 

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