I need help with combo box contents 'editability'

  • Thread starter Thread starter Madhusudhan
  • Start date Start date
M

Madhusudhan

yep im sorry 'editability' is not a real word but it helped convey my
point, so i used it :)

I'm using Access 2003 (SP1) and am coding for it in VBA.
1. I have combo boxes from which the user is expected to make choices.
I need to disallow any editing of the options in the drop down.

E.g
Combo Box has:

Minneap
Liberty
Cinci

The user should choose from one of the above three but should not be
able to change "Liberty" to "Liber" or something like that. I know
access restricts the choices to those in the combo box only but I feel
it would be neater to disallow alterations.

2. Is there a way to set a default value to the combo box where the
value is actually not part of the combo box list. Something like
"Choose conference name" needs to be displayed by default or atleast on
form load.

Thanks everyone.

Madhu
 
1 - If the "LimitToList" property is set to True then the user can only
select one of the values already in the list and cannot edit it or add
a new one.

2 - Instead of making "Choose Conference Name" the default value in
your ComboBox - which means you'll have to have code to not accept it
as a value - make it a label beside or under your ComboBox. Make the
label visible when the Combo has the focus and make it invisible when
the Combo loses the focus.

Hope this helps!

Howard
 
If you have the Limit To List property set to Yes, then alterations can't be
made. In your example, if a user types in "Liber", the Liberty will be
selected. There are ways to inlcude a message like you want; however, it
becomes one of the allowable options and that is not what you want. If you
include your message, but don't want it used, then you could use the After
Update of the combo box to see what was selected and use a message box to
tell the user they did not make a selection. I would suggest you just put a
label on your form near the combo box to give the user the information.
 
1 - If the "LimitToList" property is set to True then the user can only
select one of the values already in the list and cannot edit it or add
a new one.

2 - Instead of making "Choose Conference Name" the default value in
your ComboBox - which means you'll have to have code to not accept it
as a value - make it a label beside or under your ComboBox. Make the
label visible when the Combo has the focus and make it invisible when
the Combo loses the focus.

Hope this helps!

Howard
 
Thanks a lot Howard and Klatuu! I really appreciate your qiuick
response.

As for question (2), I wanted to put in "Choose conference name" as the
default value because I thought that was an easy thing to do. The form
open up with the combo box blank, so I thought putting in a message by
default would make it look better.
Its no big deal.
Thanks for your help with that though.

Your comments were of immense help.

Madhu
 
Back
Top