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
[highlight #EDD400]frm.ShowDialog() ' this throws an exception[/highlight]
[indent][/indent][img]https://res.cloudinary.com/engineering-com/image/upload/v1484996610/tips/exception_vqynag.jpg[/img]
If 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.