Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling Combo Box String Type

Status
Not open for further replies.

Oracle8ii

Technical User
Jun 15, 2005
7
PK
Itemid itName
1 Item1
2 Item2
3 Item3
4 Item4

I have filled the combobox through this coding in another form
and it works fine.

Private Sub FillcmbItems()
Dim i As Integer
cmbItems.Clear
If rsItems.EOF = True And rsItems.BOF = True Then Exit Sub
rsItems.MoveFirst
i = 0
While rsItems.EOF = False
cmbItems.List(i) = rsItems!ItName
cmbItems.ItemData(i) = rsItems!ItemID
rsItems.MoveNext
i = i + 1
Wend

End Sub

Is it possible to fill string type in Combo Box?

VType VTDesc
BP Bank Payment
CP Cash Payment
CR Cash Receipt
BR Bank Receipt
JV Journal Voucher
 
I'm guessing that what you mean is you want to use a string type in the itemData attribute? If so, I don't believe so. But what you can do is to create an array of the strings, and use the array subscript as the itemData value.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top