Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

combobox with multiple columns

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SAM S.L - 03 Oct 2007 22:51 GMT
Hi!
First of all thankyou for your attention and patience

I have a userform in word 2003 with a query to one table of access 2003 with
3 columns
the example code is usseful only to display one column:

With rsNorthwind

     Do Until .EOF
        ComboBox1.AddItem (i)
        ComboBox1.Column(0, i) = .Fields("companyname")
        'ComboBox1.Column(1, i) = .Fields("location")
        'ComboBox1.Column(2, i) = .Fields("year")
        .MoveNext
        i = i + 1
     Loop

  End With

what is wrong to display all 3 columns? with only the first line active:
ComboBox1.Column(0, i) = .Fields("companyname") is running ok but i active
the others two lines the code fails

I not understand where is the error to change from one field to a three
fields, perhaps can add any command to indicate the existence of three
fields in combobox? the property combobox.columncount  with valor =3 and the
error is the same

Please help .
Sorry for my bad english
Doug Robbins - Word MVP - 04 Oct 2007 10:21 GMT
If you want more than one column in the combobox, use the method that I gave
you in response to your post of October 2.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi!
> First of all thankyou for your attention and patience
[quoted text clipped - 27 lines]
> Please help .
> Sorry for my bad english

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.