Have a listview with eight columns. One contains phone numbers which is a challenge for me to present in the usual manner, ie (000) 000-0000.
The data is stored in an Access db, stored as text, formatted in the db as !\(999") "000\-0000;;_, 14 characters. Have tried formatnumber(file, 10), format(file, "(000) 000-0000" which presents all zeros.
Some of the code:
Any ideas would be helpful. thank you.
The data is stored in an Access db, stored as text, formatted in the db as !\(999") "000\-0000;;_, 14 characters. Have tried formatnumber(file, 10), format(file, "(000) 000-0000" which presents all zeros.
Some of the code:
Code:
With lvwDisplay
.Show()
.Items.Clear()
.Columns.Add("ID", 0)
.Columns.Add("Acct#", 50)
.Columns.Add("Name", 200)
.Columns.Add("Address", 210)
.Columns.Add("City, State Zip", 140)
.Columns.Add("Telephone", 100)
.Columns.Add("Amt Paid", 80, HorizontalAlignment.Right)
.Columns.Add("Date Pd", 100)
.Refresh()
End With
Dim sItem As ListViewItem
For Each nc In lv
sKey = Format(nc.CustomerID, "0000")
sName = Trim(nc.Lastname) & ", " & Trim(nc.Firstname)
sItem.Text = CStr(sKey)
sItem.SubItems.Add(nc.Phone)
sItem.SubItems.Add(sName)
Next nc ' where nc is a class