Redisplay new records in subform

bobfin

Registered User.
Local time
Today, 05:48
Joined
Mar 29, 2002
Messages
82
I have a subform that displays 20 detail records. When I change a control value on the main form, I want the subform records to change to show the new set of 20 records matching the main form. The subform has a filter to restrict its records to those that match the values in the main form. I get errors or no change when I tried refresh and requery methods. What's the most straightforward way to do this?
 
I hope I understand the question correctly...

If both of the form's RecordSources have a field in common which links them (a primary key/foriegn key combination...usually an ID# of some kind), then set the subform's Link Child Fields property and Link Master Fields property to that field. Therefore, Access automatically "filters" the subform contents by the current record on the main form.

Link Child Fields property and Link Master Fields property on the subform can be accessed by clicking on the edge of the subform in design view.

If either form's RecordSource does not contain the primary/foreign key field, then you will need to add that field to the RecordSource of the form that's missing the field.
 

Users who are viewing this thread

Back
Top Bottom