Minggu, 18 November 2012

Listing Program Edit Visual Basic 6.0

Palembang, 19 Nopember 2012 08:50

Private Sub CmdEdit_Click()
  'TOMBOL EDIT
  XSMANLEE.Recordset.Update
  XSMANLEE.Recordset.Fields("NIS") = TxtNIS.Text
  XSMANLEE.Recordset.Fields("NAMA") = TxtNama.Text
  If OptLakiLaki.Value = True Then
     XSMANLEE.Recordset.Fields("JNS_KEL") = "L"
  End If
  If OptPerempuan.Value = True Then
     XSMANLEE.Recordset.Fields("JNS_KEL") = "P"
  End If
  If CboJurusan.ListIndex = 0 Then
     XSMANLEE.Recordset.Fields("JURUSAN") = "IPA"
  ElseIf CboJurusan.ListIndex = 1 Then
     XSMANLEE.Recordset.Fields("JURUSAN") = "IPS"
  ElseIf CboJurusan.ListIndex = 2 Then
     XSMANLEE.Recordset.Fields("JURUSAN") = "BAHASA"
  ElseIf CboJurusan.ListIndex = 3 Then
     XSMANLEE.Recordset.Fields("JURUSAN") = "AGAMA"
  End If
  XSMANLEE.Recordset.Update
  XSMANLEE.Refresh
  TxtNIS.Text = ""
  TxtNama.Text = ""
  OptLakiLaki.Value = False
  OptPerempuan.Value = False
  CboJurusan.Text = ""
  LblJurusan.Caption = ""
  TxtNIS.SetFocus
End Sub

Tidak ada komentar:

Posting Komentar