Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Option Button in Access

Author  Topic 

vgunas1
Starting Member

18 Posts

Posted - 2004-04-06 : 17:31:22
Hi,

I have a form(which lists the various courses). I want to provide an option button next to the name of the course so that the student can select only one course(at a particular time). After the student clicks on the radio button and then clicks on another command button named "register" I should be able to pass the particular course ID to the next form and give him a confirmation for registration. Can anybody tell me how this can be done.

Thanks in advance!

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-04-06 : 17:35:24
Put the Course ID in the Option Value of the radio button.

--------------------------------------------------------------
Find more words of wisdom at [url]http://weblogs.sqlteam.com/markc[/url]
Go to Top of Page

vgunas1
Starting Member

18 Posts

Posted - 2004-04-07 : 09:51:41
Can anyone give me the exact way of doing this? I am a novice at using option buttons. When I place the button on the form and put in the control source as the courseID whenever the form is opened or loaded all the option button appear selected. I want them to appear not selected and allow the user to click on it and select. I dont know how exactly this can be done.

Thanks!
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-04-07 : 10:07:52
use the option group control -- the wizard will help you. you bind the group of controls to a field from your datasource, and then bind each option button (or checkbox or whatever is contained in that control) to a value.

just find the "option group" control on the toolbox, draw one on there, and follow the wizard. if you need more help let us know.

- Jeff
Go to Top of Page

vgunas1
Starting Member

18 Posts

Posted - 2004-04-07 : 10:33:45
Hi,

I tried the wizard and it created an option group. But then I didnt know how to proceed from there. All the button appear unselected when the form loads but when I click on it it doesnt get selected. Moreover I dont know how to pass the course id onto the next form after clicking it and I also have no way of knowing how many courses will be listed on this form. I am sorry for being such a pain about this but can you please help me.

Thanks in advance!:)
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2004-04-07 : 18:29:13
If you have a variable number of courses, then perhaps a better way of doing this would be with a listbox or combobox instead.

--------------------------------------------------------------
Find more words of wisdom at [url]http://weblogs.sqlteam.com/markc[/url]
Go to Top of Page

vgunas1
Starting Member

18 Posts

Posted - 2004-04-08 : 10:23:11
Hi,

THe requirement was a radio button. I dont want to have a list box or combo box.

Thanks!
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-04-08 : 11:46:35
i think i get it now .. you need a listbox or a combobox .. or you can use a radiobutton but you have to write a lot of VB code - i don't recommend it. radio buttons should be used for only when there is a small, nonchangeable set of options to pick from. (i.e., yes/no).

You'd need to use a list box.

- Jeff
Go to Top of Page
   

- Advertisement -