problem with subforms

B

bill

I have a form with three subforms.The two subforms contain dates.
In third subform I want I present records using as criteria the dates from
the other two subforms.
What code it should I write in the open form in order to it works?
Thanks
 
O

Ofer

The record source of the third sub form can have a criteria that is linked to
the other two subforms

Select * From TableName Where FieldName =
Forms![FormName]![SubForm1Name].Form![DateFieldName] And FieldName =
Forms![FormName]![SubForm2Name].Form![DateFieldName]

On the on current event of the two subforms, run requery on the third sub
form

Forms![FormName]![SubForm3Name].Requery
 
Top