coasterman
Registered User.
- Local time
- Today, 12:28
- Joined
- Oct 1, 2012
- Messages
- 59
[SOLVED]:referencing subform Control from within a second synchronised subfrom
I have a main form frmAddressEdit and two linked subforms (listed below) on that main form. The two subforms are synchronized by an unbound text box on the main form.
sfrmIssueHeader is a continuous form and simply populates fields with a time stamp and the NetworkUsername when the user enters a value in the IssueSummarytxt field
sfrmIssueDetails is a single view form which as I say is synchronised to whatever record the user has selected in the sfrmIssueHeader form
the subform controls names and their subforms are identically named. The subforms obviously share the same record source.
What I am trying to do is have the subform control for sfrmIssueDetails .visible = false when the record in the sfrmIssueHeader is empty thereby preventing the user jumping straight into the subfrmIssueDetails form without making an entry in IssueSummarytxt on the sfrmIssueHeader form.
I've tried what I thought was the correct syntax from this link http://access.mvps.org/access/forms/frm0031.htm but cant seem to hit on the right combination.
My thought was I must be in Sub1 therefore the linked subform control is simply a control to reference on main form in which case Me.Parent!Controlname.visible = False would be correct, clearly it isn't
I assume the code needs to go on the Form_Current event of sfrmIssueDetails?
I had also tried to use the unbound text box mentioned on the Main form to trigger the event in the sfrmIssueDetails control but either I again I must be getting the syntax wrong.
Any help here would be gratefully received.
I have a main form frmAddressEdit and two linked subforms (listed below) on that main form. The two subforms are synchronized by an unbound text box on the main form.
sfrmIssueHeader is a continuous form and simply populates fields with a time stamp and the NetworkUsername when the user enters a value in the IssueSummarytxt field
sfrmIssueDetails is a single view form which as I say is synchronised to whatever record the user has selected in the sfrmIssueHeader form
the subform controls names and their subforms are identically named. The subforms obviously share the same record source.
What I am trying to do is have the subform control for sfrmIssueDetails .visible = false when the record in the sfrmIssueHeader is empty thereby preventing the user jumping straight into the subfrmIssueDetails form without making an entry in IssueSummarytxt on the sfrmIssueHeader form.
I've tried what I thought was the correct syntax from this link http://access.mvps.org/access/forms/frm0031.htm but cant seem to hit on the right combination.
My thought was I must be in Sub1 therefore the linked subform control is simply a control to reference on main form in which case Me.Parent!Controlname.visible = False would be correct, clearly it isn't
I assume the code needs to go on the Form_Current event of sfrmIssueDetails?
I had also tried to use the unbound text box mentioned on the Main form to trigger the event in the sfrmIssueDetails control but either I again I must be getting the syntax wrong.
Any help here would be gratefully received.
Last edited: