Please clarify what you want to do.
i want the AM Field to input in the AccountName
is unclear.
I need to get them and put it on a
Dim AccountName as String
You already have them. They are in the ListView.
Reverend Jim
Carpe per diem
3,612 posts since Aug 2010
Reputation Points: 563
Solved Threads: 451
Skill Endorsements: 32
So every time the user clicks on a line in the listview you want to append the value from the Code Name column to AccountName. The query
"Select * from [Calls and Visits$] where AM like '" & AccountName & "%'
will never match any records if AccountName contains more than one Code Name.
Reverend Jim
Carpe per diem
3,612 posts since Aug 2010
Reputation Points: 563
Solved Threads: 451
Skill Endorsements: 32
So in pseudo code
For Each "Code Name" in the listview
get all calls and visits for that Code Name
Next
and in real code that is
Dim query As String
For Each item As ListViewItem In ListView1.Items
query = "Select * from [Calls and Visits$] where AM like '" & item.SubItems(1).Text & "%'"
'execute the query and do something with the results
Next
Reverend Jim
Carpe per diem
3,612 posts since Aug 2010
Reputation Points: 563
Solved Threads: 451
Skill Endorsements: 32
Question Answered as of 5 Months Ago by
Reverend Jim