-
Hi,
I'm setting up a combo box on my form but I'm running into the following catch 22 situation:
I don't want the user to be able to type anything in the box so I set it to the "Dropdown List" style which seems to prevent the user from typing in text. However, with this style, it won't let me set anything for .Text. The idea is that I want the combo box to initially say "Select view..." so the user know what the heck the combo box is for...But, I can't seem to figure out how to get text to show in the combo box when the form is loaded.. The only way to do this seems to be when you set the style back to "Dropdown Combo", but again, the user is allowed to enter text, which I want to prevent..
Any help would be appreciated..
Dan
-
<?>
Just set the comboxbox Locked to true
-
Well two possible things:
1) Keep it's style at the dropdown list and put a label above it to let them know what to do.
2) Switch it back and do the following:
Code:
Private Sub Form_Load()
Combo1.AddItem "Select View"
For i = 1 To 11
Combo1.AddItem i
Next
Combo1.ListIndex = 0
End Sub
Then add error code so that if they select it, it does nothing. However option 1 works best in my opinion.
-
Then again, the best bet is Locking it as HeSaidJoe has stated... I didn't think of that :)