I have another question for the community, and hopefully it's an easy
one. It seems ridiculously simple, but I can't find anything on it.
I have a combo box that is bound to a table. When a form is opened, I'd
like the current value of said combo box to be dictated by a value given
by the previous form. For the life of me, I can't figure out how to use
code to set the current value of a combo box. Here is the simple code,
taken right from a book, that I'm trying to work with.
Dim i As Integer
With Me!cboCustomer
For i = 0 To .ListCount - 1
If .Column(3, i) = Me!tboCustomerNumber Then
.Selected(i) = True <----------------------------------
Exit For
End If
Next i
End With
The line with the arrow pointing to it is where it breaks down, as the
code was written for a list box. A combo box has no .Selected property,
and I can't find anything that is its equivalent.
Any help would be greatly appreciated.
Mason
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!