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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically select one option of an option group on form open 3

Status
Not open for further replies.

SpectacledBear

Programmer
Mar 1, 2005
58
GB
can this be done? I need the second option (called option5 but is the second one down) to be selected as soon as the form opens, so I was wondering if a similar command to cmdClise_Click in the forms on open could be used to select an option? I have tried this myself but without avail. The optiongroup is called optFType

Thanks!
 
Hi
Have you tried (?):
Code:
Private Sub Form_Current()
Me!MyOptionFrameName = 2 'The number option to be selected
End Sub

Or the OnOpen event, if that is better.
 
Doesn't have the OptionGroup a DefaultValue ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I dont think it does. None are selected on open. I will try and set one. I will also try your suggestion Remou.
 
Hi
Just to make sure we are talking about the same thing (please excuse nit picking language). Was this button created using the OptionGroup tool, which looks like a box with xyz at the top, or by several option buttons, which look like little staring eyeballs? :-D
 
So ... to continue with the nit picking, you click on the line around the group, you click the properties page, you select the data tab, and you do not see default value?
 
Oh well, I guess I have a different version. Hope you get sorted soon. [peace]
 
What version of Access are you using? As far as I can remember, every version of Access has a "Default" option for the Option boxes.

-------------------------
Just call me Captain Awesome.
 
Im using access 2000, i guess i may have deleted it somehow? anyway i changed it to 2 and now it works fine, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top