filter a field in the form

amanco

Registered User.
Local time
Today, 17:57
Joined
May 10, 2004
Messages
53
i have a check box in the main form i would like to show only records with "No" value [not ticked] , what are the different ways to do that?

and one more thing, how can i make a quick subform based on the values of the main form, where when i browse thru the main form, the cursor moves to the corresponding record in the subform.

thanks :)
 
1) To show only records meeting a certain requirement, use a query with a WHERE clause as the recordsource of your form.

2) To have a sub-form show records related to the record shown in the main form, ensure that the Link Child Fields and Link Master Fields properties of your sub-form are set to correctly reflect how the two forms relate to each other.
 
joeselch said:
1) To show only records meeting a certain requirement, use a query with a WHERE clause as the recordsource of your form.

thanks for your reply joeselch, is there away to filter the form directly without pulling data from a query for the form. thanks
 
It's probably possible to filter the form - I don't use filters, so I have no idea.

Why don't you want to base your form on a query?
It is generally best to use a (stored) query (rather than a table) as a form's record source. Among other things, using a query allows you to easily sort the records, display fields from related tables, etc.
 
I wouldn't argue with the advice given that your form should be bound to a query, however if you use the filter method you can use the same query whether you want to filter for yes or no values.

DoCmd.ApplyFilter "", "[Archive]=No And [LastName]<>""Reference"""

uses two criteria, Archive is a Boolean field
 
thank you both, i'll try the suggested methods.
 

Users who are viewing this thread

Back
Top Bottom