Regarding the default option

cnuhima

Registered User.
Local time
Yesterday, 22:41
Joined
Jun 19, 2008
Messages
72
Hi,

I have a form..which have a group of option buttons..based on the selected option ..the text boxes would display..

But by default one option in the group is selected and as result the textbox under it are visible when the form is loaded.

I tried giving visible property false..in form load..

I want either the first option button to be default or nothing..

Please help me Out..

Thank you..

With Regards,
HimaBindu
 
Each option in an OptionGroup has an OptionValue property, and the OptionGroup has a DefaultValue property. Set the group's default to the value of the option you'd like to be...well...the default, or leave it blank if you don't want a default.
If you have code that handles a click on the option group, then run that code when your form opens.
Code:
Private Sub Form_Open()
  MyGroup_Click()
End Sub

Private Sub MyGroup_Click()
  Me.tbTextBox.Visible = (Me.MyGroup = 1)
End Sub
 

Users who are viewing this thread

Back
Top Bottom