Linking Two Forms (both have Subforms)

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

Guest

I have a form that serves only as the backdrop for a subform in datasheet
view, so I can view multiple records at one time. I want to have a button
that will get details from another form (which is set up the same
way...backdrop is the main form and the data is in datasheet view with a
subform). I am having trouble creating the button that will open the form
and only display the records where the selected record in the previous form
is relevant. How would I do this?

Thanks.
 
I have a form that serves only as the backdrop for a subform in
datasheet view, so I can view multiple records at one time. I want to
have a button that will get details from another form (which is set up
the same way...backdrop is the main form and the data is in datasheet
view with a subform). I am having trouble creating the button that
will open the form and only display the records where the selected
record in the previous form is relevant. How would I do this?

Forget the main form; use one form in continuous forms view, and put your
command button in the Form Header or Form Footer section.

The click event of the button can call the DoCmd.OpenForm method and set
its Filter parameter -- check help for details.

HTH


Tim F
 
Thanks TIm

Tim Ferguson said:
Forget the main form; use one form in continuous forms view, and put your
command button in the Form Header or Form Footer section.

The click event of the button can call the DoCmd.OpenForm method and set
its Filter parameter -- check help for details.

HTH


Tim F
 
Hello Josh,

If you want to reference a field of the sub form on the main form
(backdrop), you create a field / button on the mainform that gets is data
like this: =[SubFormWindowName].[Form]![FieldNameOfSubForm]

On your main form you have created a subform object. This is initially
called Child23 (or any number where you left off). Go to the 'Other' tab on
its properties and give it a meaningful name. Put this name where I used
<SubFormWindowName>.

You can even use this field on the main form to serve as the main-form field
for another sub-form via Link Master / Child fields.

Vincent
 
Back
Top