Add a Full Name to my combobox

I have table in VB6 and want to put the Last name, comma, First Name in the drop down box on my form.  

After I pull up the data from database, the Last name is located in field(2)  The first name is in field(1)

Here is my code below for adding rec.Fields(2) to my dropdown box.  I don't know how to also add the first name to the same line in my drop down.

Would it look something like this?  

.AddItem rec.Fields(2), rec.Fields(1)
With Combo1
    Do While Not rec.EOF
    .AddItem rec.Fields(2)
    rec.MoveNext
    Loop
End With

Open in new window

al4629740Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Paul MacDonaldConnect With a Mentor Director, Information SystemsCommented:
  ...
   .AddItem rec.Fields(2) + "," + rec.Fields(1)
   ...
0
 
Martin LissOlder than dirtCommented:
Just a very tiny tweak. It should probably be a comma plus a space between the parts of the names.

.AddItem rec.Fields(2) + ", " + rec.Fields(1)
0
 
al4629740Author Commented:
thank you!
0
All Courses

From novice to tech pro — start learning today.