RSS

Edit Data Mata Kuliah

B4

Private Sub AKHIR_Click()
Data1.Recordset.MoveLast
End Sub

Private Sub AWAL_Click()
Data1.Recordset.MoveFirst
End Sub

Private Sub CETAK_Click()
CrystalReport1.WindowState = crptMaximized
CrystalReport1.RetrieveDataFiles
CrystalReport1.Action = 1
End Sub

Private Sub Command1_Click()
Dim Cari As String
Cari = Text4.Text
If Option1.Value = True Then
With Data1.Recordset
.Index = “KODEX”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “Maaf Data yang anda cari belum terdaftar!”, vbOKOnly + vbInformation, “Hallo”
End If
End With
ElseIf Option2.Value = True Then
With Data1.Recordset
.Index = “NAMAX”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “Maaf Data yang anda cari belum terdaftar!”, vbInformation, “Hallo”
End If
End With
Else
With Data1.Recordset
.Index = “SKSX”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “Maaf Data yang anda cari belum terdaftar!”, vbInformation, “Hallo”
End If
End With
End If

SIMPAN.Enabled = False
HAPUS.Enabled = True
PERBAIKAN.Enabled = True
CETAK.Enabled = True
Selesai.Enabled = True

End Sub

Private Sub Form_Activate()
Command1.Enabled = False
SIMPAN.Enabled = False
HAPUS.Enabled = True
PERBAIKAN.Enabled = True
HAPUS.Enabled = True
Selesai.Enabled = True
Option1.Value = False
Option2.Value = False
Option3.Value = False
End Sub

Private Sub HAPUS_Click()
perhatian = MsgBox(“Pastikan data yang akan anda hapus adalah benar. Jika anda yakin Klik Yes, jika tidak klik No!”, vbYesNo + vbCritical, “Perhatian”)
If perhatian = vbYes Then
Data1.Recordset.Delete
Data1.Recordset.MoveFirst
Else
Data1.Refresh
End If
End Sub

Private Sub MAJU_Click()
With Data1.Recordset
.MoveNext
If .EOF Then
.MoveLast
MsgBox “Ini adalah Data yang paling akhir!”, vbInformation, “Hay!”
End If
End With
End Sub

Private Sub MUNDUR_Click()
With Data1.Recordset
.MovePrevious
If .BOF Then
.MoveFirst
MsgBox “Ini adalah Data yang paling awal!”, vbInformation, “Hay!”
End If
End With
End Sub

Private Sub Option1_Click()
Text4.Visible = True
Text4.SetFocus
Text4.Width = 1400
Command1.Enabled = True
End Sub

Private Sub Option2_Click()
Text4.Visible = True
Text4.SetFocus
Text4.Width = 1695
Command1.Enabled = True
End Sub

Private Sub Option3_Click()
Text4.Visible = True
Text4.SetFocus
Text4.Width = 615
Command1.Enabled = True
End Sub

Private Sub perbaikan_Click()
Data1.Recordset.Edit
SIMPAN.Enabled = True
HAPUS.Enabled = False
PERBAIKAN.Enabled = False
CETAK.Enabled = False
Selesai.Enabled = False
End Sub

Private Sub Selesai_Click()
Form8.Show
Form4.Hide
End Sub

Private Sub SIMPAN_Click()
Data1.Recordset.Update
SIMPAN.Enabled = False
HAPUS.Enabled = True
PERBAIKAN.Enabled = True
CETAK.Enabled = True
Selesai.Enabled = True
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Len(Text1.Text) <> 9 Then
MsgBox “Maaf harus 9 karakter”, vbOKOnly, “Error”
Text1.SetFocus
Else
Text2.SetFocus
End If
End If
End Sub

 

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

 
%d blogger menyukai ini: