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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 
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
 
Back
Top