Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying subform

Status
Not open for further replies.

gem28

Instructor
Nov 5, 2001
64
PH
Hi!

I have a form with a radio button on the top part of it. This radio button has 2 choices: Activity and Leave. If I click Activity, the subform for it should be displayed and vice versa. Please help me on how to go about it. Thanks.

tin
 
Subforms are form elements that can be included conditionally, but only when the document opens. There is no subform reload ability in Notes (although I have to check that particular issue in R6).
What you are looking for is not subform functionality, but Hide/When functionality.
I would therefor suggest that you keep your subforms, and add a Hide/When formula to all data in each subform, tying it into the value of the radio button.
That would allow you to display different parts following the user's choice, at the price of paying a bit of attention to whatever additions you might need to do to the Hide/When formulas for other reasons.
That would also avoid the much more cumbersome (and hardly user-friendly) alternative of saving the document with only that choice, closing it and reopening it.

On the other hand, if the choice is something you do at the start of the document's creation, you might want to think of using two buttons for creating the document instead of one.
Indeed, it would seem that, for the moment, you have one button to create the document, which then forces the user to choose what kind of document to create.
It might be better to give the user the choice from the menu by creating a list with Activity Document and Leave Document as items. By clicking on one or the other, the proper document type is then created by using code that is much easier to implement.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top