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

Setting a default value for a grouped option box.

Status
Not open for further replies.

JohnEMcCarthy

Programmer
Jun 15, 2007
3
US
I have two option boxes in an option group. Because, for whatever reason, Access does not allow the grouped option boxes to have click events, I put their respective code in their Got Focus events.

When the form loads, I want one of the option boxes (Opt_Distinct) to be true (or "clicked"), how do I get this to happen in the Form Load event.

I'd imagine this is a simple task. But I cannot, for the life of me, get it to work properly. The fact that I cannot use click events and must use got focus events makes things much more difficult.

Thanks a million.
 
Hi......

Options are grouped within a Frame and the Option is a Value for the Frame

Set the Frame value for a Default......

Frame1.Value = 1

This sets the Option1 within Frame1 to True

Then you could use a Select Case Statement

Select Case Frame1.Value
Case 1
"do something relate to this Option"
Case 2
"do something relate to this Option"
Case 3
"do something relate to this Option"
Case 4
"do something relate to this Option"
End Select


Hope this helped........

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top