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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate Combo Box With Field From Data Environment 1

Status
Not open for further replies.

CAPiTA

Technical User
May 27, 2005
16
US
I have a combo box named cboPrt_Num and a data field BladeName from DataEnvironment1.Blade_Name. I want the values of this field to populate the combo box, but only the first value appears. How do I get all the values to display?
 
Try faq222-2244 for guidance on getting the best answers here.

For this question use the AddItem method and loop through the recordset with MoveNext. There is sample code on the forum if you do a search on AddItem

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Essex Steam UK for steam enthusiasts
 
i = 0
Do While Not DataEnvironment1.EOF
cboPrt_Num.AddItem DataEnvironment1!Blade_Name)
cboPrt_Num.ItemData(i) = i
i = i + 1
DataEnvironment1.MoveNext
Loop

HTH

ciao for niao!

AMACycle

American Motorcyclist Association
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top