This will depend on what you want to do, but I'll try to point you in the right direction.
In design view, open the Property Sheet for the Option Group. On the Event tab, find After Update and choose Code Builder. Access makes your procedure for you, which will be run when the event is triggered. It looks like:
- Private Sub myOptionsGroup_AfterUpdate()
-
-
End Sub
Now you can put whatever code you want in there. Ignoring variables for now, we're going to use code to manipulate the Properties of some Control on the form. Say there is a text box on your form called myTextBox.
You can refer to the properties of the text box with the . character. To find out what properties you can change, check the
Textbox Object Members.
Now, the default Property of a text box is .Value. This allows us to write
To set other properties we would write
- myTextBox.BackColor = vbRed
For each property, there is a page like
TextBox.BackColor Property that tells you what it does, when and how to set it, and gives examples.
If you want to work with some other control, just look it up in the
Access Object Model Reference and see what properties it has, and what you can set them to. After the textbox object, the Form object will probably be the most useful to learn.
Sorry for the long post, but I hope this gets you where you want to go.