Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refer to Columns in Word User Form

Status
Not open for further replies.

blurworld

Programmer
Sep 19, 2001
46
0
0
GB
Hi

I have a MS Word User Form with a listbox, how do i populate it with rows of data (from access) with 2 columns - i know how to/can do it with 1 column... i.e.

Set oRecordSet = oDatabase.OpenRecordset("Customers")

'add company names to lbExistingCustomers listbox
With oRecordSet
Do While Not .EOF
ExistingCustomers.lbExistingCustomers.AddItem .Fields("CompanyName").Value
.MoveNext
Loop
.Close
End With

then later refer to the 1st columns value of a selected row.

Cheers

-Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top