There are several "visibility tricks" you can use to make portions of your layout appear or disappear in response to user actions. Most require some degree of scripting, However.
- Enter Layout Mode
- Place a tab control on your layout.
- Give it two tabs: Male and Female.
- Put the the Coat, Neck, Sleeve, Waist etc. fields on the Male tab and put the others on the Female tab.
- Select the Male tab in the tab control and type in "Male" without the quotes into the Name box at the top of the Inspector on the Data tab.
- Now select the Female tab and follow the same steps to name it "Female".
- Now we can write a short script that uses the value of your radio button field to select the matching Tab in the tab control
Go To Object [YourTable::RadioButtonField]
That's it, just the one script step, you'll need to subsitute the name of your table and the name of your field for what I've used there. To created it, select Manage | Scripts, click the New button, give your script a name and double click the go to object script step after you find it in the left hand list of steps. Then click the Specify button at lower right to open the options dialog, then click the upper specify button to bring up the specify calculation dialog. Find your radio field at the top and double click it to add it to the calculation. Finally close all these dialogs by clicking OK until you get back to the script editor. Close that window by clicking the window close control and save your changes when asked.
- Now right click your radio button field and select script triggers from the pop up menu. Select the OnObjectModify trigger and select your new script to run when this field is modified.
- Now return to browse mode and test this out by clicking the male and female radio buttons.
- Once you are sure it works, you can return to layout mode, select Layout setup... , select the script triggers tab and specify that OnRecordLoad also runs this same script.
- Finally, when you are sure you've got everything working, you can enter layout mode and specify fill and border colors or patterns for the tab control to make the tab control invisible.
Other visibility tricks can be found here: How to invisible a button
Thank you for your help. Can you clarify the part where u say I will need to substitute the name of my table.
When I do your steps the script reads Go to Object [Object Name: ContactManagement:: Male Female]
Is that right?
Looks right if Male Female is the name of your field and when you check Show Records From in Layout setup..., you see ContactManagement.
Hey thanks for your help with the radio button. I have another question for u...
I have 2 containers for pictures and i want to be able to swap the pictures with the click of a button. Do you know what the script would be for that?
The basic swap method (used for many decades in numerous programs) is to use a third location for temporary storage.
If these were just number or text fields, I'd use this code:
Set variable [$Temp ; YourTable::field1 ]
Set Field [YourTable::field1 ; YourTable::Field2]
Set Field [YourTable::Field2 ; $Temp]
I'm pretty sure that will also work with container fields, but try it to be sure. If it doesn't, define a global container field and use it with Set Field in place of $Temp with set variable.