var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to link two subforms?
I have three forms, a mainFrm, subFrm1 and subFrm2 (both subforms are set to continuous).
The MainFrm control source field is itemID, the subFrm1 control source is LinkItemID and the control source of subFrm2 is also LinkItemID.
I would like to know how I can link the two subforms to enable subFrm2 to display linkItemId records when a row is selected in subFrm1.
Yes it is possible to do. It is similar to cascading combo/list boxes.
Originally Posted by moss2076
In the second sub form, set the master linking field to be a form reference to a control in the first sub form.
In the first sub form, use the On Current event to requery the second sub form. (example: Me.Parent.SubForm2Name.form.requery )
I cannot get your suggested code to work -
I get a run time error 2455 You entered an expression that has an invalid reference to the property form/report. So for some reason the code isnt referring to the second subform correctly.
The main form is called frmItem, the first subform is called subFrmItem, and the second subform which I want to requery is called frmQryTest, so I dont know why this method isnt working.
I have found another method which does work, although it involves having to place an unbound textbox (txtTest) on the main form (frmItem), setting the textbox control source to the first subform -
and then linking the child and master fields of the second subform (frmQryTest) to the field (linkLocationID) and the textbox.
I got it working with this code in the on current event -
Glad to hear you got it working.