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!

Option Group SetFocus problem after click events 1

Status
Not open for further replies.

BubbaJean

IS-IT--Management
Jun 5, 2002
111
US
Working on Access 2000 I have placef a option group called
"SelectProductCategory", On open Form it works great, the defualt setting is Opt1, however, I need the same thing to happen if someone clicks command button i.e.,
Add Record
Undo Record
Save Record
Etc.. what is the code and where do I place the code set focus on Opt1

Thanks in advance!!
 
I'm not sure if I'm understanding you correctly, but here goes....

If you want the option button to be set to Opt1 anytime a user clicks one of the above mentioned buttons(add/undo/save) just place the following code in the OnClick event of the buttons.

SelectProductCategory.value = 1
selectproductcategory.setfocus

This should set the option group to the first available option and also set focus on the control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top