MarcelBeals
Programmer
Hello Everyone,<br><br>I am using listview to display data and am getting a <br><br>13: Type Mismatch error<br><br>I was wondering if anyone knows where there are any good examples for me to use as a guidline.<br><br>Here is the the code that is causing me the problem:<br><br> lvwCandidates.ListItems.Clear<br> <br> For lngIndex = 1 To objCandidates.Count<br> With objDisplay<br> <br> 'retrieve collection item for processing<br> Set objDisplay = objCandidates.Item(lngIndex)<br> <br> tmpLastName = objDisplay.LastName 'MMB listview<br> <br> 'store the Candidate ID as Key value<br> *here Set itmDisplay = lvwCandidates.ListItems.Add(, , tmpLastName) <br> <br> With itmDisplay<br> .SubItems(1) = objDisplay.FirstName<br> .SubItems(2) = objDisplay.MiddleInitial<br> .SubItems(3) = objDisplay.Salutation<br> .SubItems(4) = objDisplay.EmployeeID<br> strSIN = objDisplay.SocialSecurity<br> .SubItems(5) = Mid(strSIN, 1, 3) & "-" & Mid(strSIN, 4, 3) & "-" & Mid(strSIN, 7, 3)<br> End With<br><br> End With<br> Next<br>