Yes, I have tried using a variation of that Bulldog. I do not understand why the code below does not work. No build errors, and it adds the item from txtSurgProcedure that is stored as strSurgProcedure to the listview, but does not add any of the subitems. If I add a second item, it adds it to the row.
Here is my code:
Code:Private Sub btnAddSurgeProcedure(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddSurgProcedure.Click Dim lvItem As New ListViewItem, strSurgProcedure As String, strSurgPerformed As String, strSurgName As String, strSurgPhone As String, strSurgFacility As String, strSurgPostOp As String strSurgProcedure = Trim(txtSurgProcedure.Text) strSurgPerformed = Trim(dtpSurgPerformed.Text) strSurgName = Trim(txtSurgName.Text) strSurgPhone = Trim(txtSurgPhone.Text) strSurgFacility = Trim(txtSurgFacility.Text) strSurgPostOp = Trim(txtSurgPostOp.Text) lvSurgProcedures.Items.Add(lvItem) lvItem.Text = (strSurgProcedure) With lvItem .SubItems.Add(strSurgPerformed) .SubItems.Add(strSurgName) .SubItems.Add(strSurgPhone) .SubItems.Add(strSurgFacility) .SubItems.Add(strSurgPostOp) End With




Reply With Quote