i got a little problem here, i want to update my record by opening it on another form.
but it only update the first record on the list,
can anybody help me with this.
heres my code:
'first form
Private Sub command1_Click()
If Text1 = ListView1.SelectedItem.Text Then
With form2
.Label1.Caption = ID_no
.lbfname.Caption = ListView1.SelectedItem.SubItems(1)
.lbmname.Caption = ListView1.SelectedItem.SubItems(2)
.lblname.Caption = ListView1.SelectedItem.SubItems(3)
.Show vbModal
End With
Exit Sub
'second form
Private Sub Command1_Click()
With Adodc1.Recordset
sql = "select * from first_sem_info where fname = '" & lbfname.Caption & "' and lname = '" & lblname.Caption & "'"
.Fields("grade") = cbgrade.Text
.update
MsgBox "success"
End With
End Sub