how to use the option button

confuse

Registered User.
Local time
Yesterday, 19:56
Joined
Jul 17, 2008
Messages
49
Hi All!!

I gotta need your help. I had a problem with the option group button im not familiar with this. I have a option group button with check box controls in a form named Orders. The check boxes name are check payment and cash payment. If the user click the check payment box i want some of the text box in to be lock ( the user cant access it) and open a form named Check Payment form. What are the codes in vb..

I really appreciate your help...Thanks a lot:)
 
All the buttons in your optiongroup have a value (you can change the values in the properties of the buttons), usually 1, 2, 3 etc.

In the After Update event of your optiongroup you can have a code like this:
Code:
Private Sub Your_Option_Group_AfterUpdate()
    Select Case Your_Option_Group.Value
        Case 1
            MsgBox "the button with value 1 was clicked"
            'Textbox1.Enabled = False      'maybe some of these?
            'DoCmd.OpenForm "Form name"    'and these?
 
        Case 2
            MsgBox "the button with value 2 was clicked"
            'Textbox1.Enabled = True
    End Select
End Sub
 
thank you for the help it works..... I really appreciate your help eriksnoek, thank you very much..yeeeeeeeeeeeeeeppppppppppeeee:D
 

Users who are viewing this thread

Back
Top Bottom