|
-
Jan 4th, 2001, 10:05 PM
#1
Thread Starter
Hyperactive Member
I am working on a program where the customer wishes that the customer name be entered as it would be seen on a shipping label, envelope, invoice, etc. For instance, Rev. Michael L. Burns, Albion Seventh Day Baptist Church, Billy Jones, etc. No problem here.
However, on one form I need a Listview control that allows me to select a particular customer from a list of customers in a database table which stores the names as entered above. Again, this works fine except I would like to parse the data as it is read from the table and put into the listview control so as to display as follows: Burns, Rev. Michael L.; Jones, Billy; Church, Albion Seventh Day.
Can anyone show me how this can be done. Below is the code I use to load the listview at present:
Private Sub DoList()
Set LCusRS = New ADODB.Recordset
LCusRS.Open "SELECT * FROM mstCust", db, adOpenStatic, adLockOptimistic
If Not LCusRS.BOF Then LCusRS.MoveFirst
ListView1.ListItems.Clear
Do While Not LCusRS.EOF
ListView1.ListItems.Add , , LCusRS!Name '//Add names to list
LCusRS.MoveNext
Loop
If Not LCusRS.EOF Then LCusRS.MoveFirst
ListView1.Refresh
End Sub
Any help here would be most appreciated.
Rev. Michael L. Burns
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|