linked forms used as subforms

Laia

New member
Local time
Today, 05:16
Joined
Nov 17, 2006
Messages
2
Dear all,

Is it possible to create a form with a subform where the subform does not appear permanently in the form but only when it is needed (using a command button or similar)? Should I use linked forms?

If this last is the case, how can I make that the second form only shows the records that depend on the current record in the first form (like subforms do)? In other words, how could I make to fill automatically the field in the second form that depends on a field in a first form?

Many thanks in advance.

Laia
 
If this last is the case, how can I make that the second form only shows the records that depend on the current record in the first form (like subforms do)? In other words, how could I make to fill automatically the field in the second form that depends on a field in a first form?
Code:
DoCmd.OpenForm acForm, "YourFormNameHere",,"[YourFieldNameHere]=" & Me.YourTextBoxWhereTheLinkingFieldIsLocated

And if it is text instead of a number:
Code:
DoCmd.OpenForm acForm, "YourFormNameHere",,"[YourFieldNameHere]='" & Me.YourTextBoxWhereTheLinkingFieldIsLocated & "'"
 

Users who are viewing this thread

Back
Top Bottom