Select item in Combo Box

miki

Registered User.
Local time
Today, 17:57
Joined
Oct 23, 2001
Messages
18
How i can select item in Combo Box by code?

thanks!!!
 
If you want to set a value for the combo box in an event procedure, you could use something like this:

Dim strComboValue As String
strComboValue = "Your choice here"
[forms]![yourform]![comboboxname] = strComboValue


If the combo box contains numeric or date data, be sure to dimension your variable accordingly.

You could also set a default value for your combo box using properties.
 
You can also select by where it is in the list by using [forms]![yourform]![comboboxname].itemdata(n) where n is the number of the data (starts at 0)
 

Users who are viewing this thread

Back
Top Bottom