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

Option Button in Access

Status
Not open for further replies.

vguna

MIS
Apr 7, 2004
4
US
Hi,

Can anyone please let me know how to use an option button in an access form? I have a form that lists the courses. I need to have an option button next to each course. When the form loads all the option buttons have to be unselected. The user should be able to click on one option and select one(at a particular time). Once he selects the course and clicks a "register" command button, the course id pertaining to the selected course should be passed to another form called "Registeration".

I tried using the wizard and it didnt really help me understand anything. If anyone can let me know how to do this it would be great!

Thanks in advance!
 
Options buttons are to be used in an Option Group. First create an option group. This is a rectangular box that is associated to the value of the option button selected within it. Now create the option buttons for each of your items. There is a value property for each button. Enter the value that should be passed to the Option Group control. When a button is selected the value of that button then becomes the value of the Option Group control.

Now as far as passing this value to a another form you can use the Open Arguments parameter of the command:
Code:
DoCmd.OpenForm formname[, view][, filtername][, wherecondition][, datamode][, windowmode][,[red] openargs][/red]

Look in access help for the Open Arguments method and how to call it up from within the newly opened form.

Good luck.



Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top