
VB combo list box and Access table
Hi Mike!
Try this, and let me know how it works out!
Set recCustomer = dbSpot.OpenRecordset("SELECT Customer.Name " _
& "FROM Customer ORDER BY Customer.Name", dbOpenSnapshot)
With recCustomer
.MoveFirst
Do
cboCustomer.AddItem .Fields("Name").Value
.MoveNext
Loop Until .EOF = True
End With
cboCustomer.ListIndex = 0 'This will display the first customer
On Sun, 15 Mar 1998 12:49:01 GMT, "Mike Tredwell"
Quote:
>Hi all, I have a problem whit VB Combobox....
>I have a ComboBox in a Form (in VB) and I want to this Combobox give me the
>list of the Table in DataBase make whit Access.
>When I click on this ComboBox, Only the first name appear in the choice in
>the combobox...but I have 10 name in this Table, make with Access...
>How I can corrige that...?
>Thank a lot !