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

Option Group Question 1

Status
Not open for further replies.

lifter10

MIS
Dec 3, 2003
45
US
I have a form with an option group and six option buttons in that group. The buttons are there to select a specific report. However, when the user selects a specific option button, I want a combo/list box filled with choices of company numbers (different reports will have different choices for company numbers). There is no on click event for option buttons, so how would I be able to do this? Is it even possible?

Thanks in advance,

Chris
 
there is however a onClick event for the optionGroup...

so just test what value your optionGroup is at onClick, and then populate your comboBox accordingly...
 
Okay now I'm having problems with populating the combobox. I hate this damn thing sometimes. I'm using Access 97. My question is, I name my combobox cboCompany, why can I not just call cboCompany.AddItem "01" and have that number be added to the list? What do I have to do to get that to work?

It's frustrating like when you're trying to change the color of a textbox in the OnFormat event and you type in "Text1." and the list of properties and methods comes up and .ForeColor isn't an option. But when you go ahead and put in Text1.ForeColor = 255 it works. I don't understand why that's not in the list?

Sorry for the rant and thanks in advance,

Chris
 
because that's not the correct syntax...

Presumably, you've got the combobox's rowsource as value list, and you list the values that you can have right?

well, in that case, just change the rowsource property...
something like:

me.rowsource = me.rowsource & "; '01'"

you may have to fiddle with it a bit...
 
Once again thanks for the information. I'm getting close to my deadlines and didn't have the time to figure it out for myself. I appreciate it very much!

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top