I think my code is correct but somehow I got this invalid property value.
What could possibly be wrong? i did a review on my access tables and naming conventions but still can't find anything.
What could possibly be wrong? i did a review on my access tables and naming conventions but still can't find anything.
Code:
Private Sub lstMaster_DblClick()
If Not (Me.lstMaster.SelectedItem Is Nothing) Then
frmNew.txtID.Text = Me.lstMaster.SelectedItem.SubItems(0) <-- error was here
frmNew.txtFName.Text = Me.lstMaster.SelectedItem.SubItems(1)
frmNew.cboPosition.Text = Me.lstMaster.SelectedItem.SubItems(2)
frmNew.txtStatus.Text = Me.lstMaster.SelectedItem.SubItems(3)
frmNew.txtRate.Text = Me.lstMaster.SelectedItem.SubItems(4)
frmNew.dtpStart.value = Me.lstMaster.SelectedItem.SubItems(5)
frmNew.dtpEnd.value = Me.lstMaster.SelectedItem.SubItems(6)
frmNew.txtAge.Text = Me.lstMaster.SelectedItem.SubItems(7)
frmNew.txtAddress.Text = Me.lstMaster.SelectedItem.SubItems(8)
frmNew.cmdUpdate.Caption = "&Update"
frmNew.Show
Unload Me
End If
End Sub