display table fields in a list box

ekta

Registered User.
Local time
Today, 07:30
Joined
Sep 6, 2002
Messages
160
Hi:

I have a combobox that shows my database tables. I want that when user selects a table, all the fields in that table should be displayed in the listbox. How can I do that?

Thanks,

Ekta
 
Choose Field List as the row source type.
 
Assuming you know how to additem to the listbox,


Dim n As Integer
for n = 0 to rst.fields.count - 1
listbox.additem rst.Fields(n).Name
next n
 
Last edited:

Users who are viewing this thread

Back
Top Bottom