Yes/No Combo box

1jet

Registered User.
Local time
Tomorrow, 07:29
Joined
Sep 15, 2008
Messages
117
Hi all,

I'm placing some combo boxes onto a form, and I need just an "Open" or "Closed" option available for users to select.
Can I have some help with the coding?
I'll be using this code at the "on got focus" event of each combo.

I was thinking I could create a table with just "Open" and "Closed" as fields and have them as the combo's rowsource....but somehow I'd feel more comfortable using code.

Thanks
 
Code:
ComboName.RowSourceType = "Value List"
ComboName.RowSource = "Open;Closed"

Regards,
Tim
 
Code:
ComboName.RowSourceType = "Value List"
ComboName.RowSource = "Open;Closed"
Regards,
Tim


Thanks Tim, much appreciated...I have another question however...

I have 7 combo's that will all have the same Open/Closed options...thus I thought of using the one function for all "on got focus" events for all 7 combos...theyre called me.cboSunday, me.cboMonday etc

So as their names differ, I was wondering whether there was any code that can retrieve the names of the control that is on focus. I could then use that name converted to string to replace me.comboname??
 
nevermind...i think i found it

me.activecontrol.....
 

Users who are viewing this thread

Back
Top Bottom