Listview
Listview
(OP)
Have a list view that populates members from an Access DB. Purpose is then to populate a form when a members name is clicked:
Any ideas would be helpful. Thank you.
CODE -->
Private Sub mnuView_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuView.Click Dim frm As New frmAllView tsStatus.Text = "" FormChange(bFormChanged) Me.Hide() If Not dataMgr.MTDatabase Then MessageBox.Show("Enter a record to continue", "No records") Me.Show() Else frm.ShowDialog() ' this throws an exceptionIf frm.lvwDisplay.SelectedIndices.Count = 0 Then Exit Sub Else iID = CInt(frm.lvwDisplay.SelectedItems(0).Index) NoRecords() dataMgr.FindOneName(iID, nc) FillBoxes() End If Select Case frm.Action Case Is = CStr(iID) If frmAllView.lvwDisplay.Items.Count = 0 Then Exit Sub Else iID = CInt(frmAllView.lvwDisplay.SelectedItems(0).Text) dataMgr.FindOneName(iID, nc) FillBoxes() txtLastName.Focus() End If Case Is = "X" MsgBox("X") End Select End If txtFirstName.Focus() bFormChanged = False FormChange(bFormChanged) End Sub
Any ideas would be helpful. Thank you.
RE: Listview
Is there code in the New() method of frmAllView, or in the Form_Load event handler?
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
RE: Listview
CODE -->
Is this what you are looking for?
RE: Listview
I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
RE: Listview
CODE -->