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 problem Please help!!!!!!

Status
Not open for further replies.

Jar80

Technical User
Jun 13, 2004
69
FI
I have following problem:
Is there any way to change option group value when pressing button in another form.

What is the vb code to change option group value ex. group contains buttons 1,2,3,4 and 5. Now the button 4 is down and i want that when i press button in that another form then button 1 should be activated.
 
hi

if the form with the option group is open, you can adress it and the controls on it using syntax like

Form!yourformname!youroptiongroupname = 1

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
It doesn´t work, the error is (object is not open or doesn´t exist).
 
Hi

Ok so give us some clues

name of the two forms

name of the option group control

post the code you typed

in which event did you put the code

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Name of the forms is: Work and second which contains the button where the code is has Msg work form.

Group name is status label.
Buttons in the group is named for: Wait, Abort, Start up and finished.

Code is in the Msg work form which contains that No button.

Private Sub No_Click()
DoCmd.Close acForm, "Msg work form", acSaveNo
DoCmd.OpenForm "Work", acNormal, "", "", acFormAdd, acNormal
Me.Form![Work ]!status_Label = 1
End Sub
 
Problem is solved, THANK YOU! KenReay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top