Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Really appreciate your site. Really good site for learning what others do when they run into problems. You guy's are great!!!..."

Geography

Where in the world do Tek-Tips members come from?

Populate combobox with custom column headers...Helpful Member! 

Webkins (Programmer)
6 Mar 12 12:04
I have an Access combobox that contains 4 columns. I am using the following code to populate the combobox with data and is working fine:

responsible_pending.RowSource = ""
rs.MoveFirst
Do
responsible_pending.AddItem rs![work_order] & ";" & _by & ";" & status & ";" & technician
rs.MoveNext
Loop Until rs.EOF

Now I would like to add my own custom column headers to the 4 columns. Can someone help me with this please. Thank you in advance.
Helpful Member!  randy700 (Programmer)
6 Mar 12 12:18
  
I would probably just put labels above the list box because, if the headings are IN the box, they would be selectable.  
But, if you still want them there, can't you just do an AddItem before entering your Do Loop?
 

Randy

PWise (Programmer)
6 Mar 12 12:22
no need for all this

i don"t know where you set rs

but i would change the Sql of rs to include the custom heders

ie if the field name is [Work_order]
the sql should be select [Work_order] as [Work order] ..From tablename

just set ColumnHeads form the combo box to yes

and set me.responsible_pending.recordset = rs

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close