RSS

Pengolahan Data Mahasiswa

B3

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 = Text6.Text
If Option1.Value = True Then
With Data1.Recordset
.Index = “NPMX”
.Seek “=”, Cari

If .NoMatch Then
MsgBox “maaf data yang anda cari tidak ditemukan, tolong di cek kembali!”, vbOKOnly + vbInformation, “HAY”
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 tidak ditemukan, tolong di cek kembali!”, vbInformation
End If
End With
Else
With Data1.Recordset
.Index = “AGAMAX”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “maaf data yang anda cari tidak ditemukan, tolong di cek kembali!”, vbInformation
End If
End With
End If
End Sub

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

Private Sub Form_Load()
Combo1.AddItem “Laki-laki”
Combo1.AddItem “Perempuan”
Combo2.AddItem “Islam”
Combo2.AddItem “Khatolik”
Combo2.AddItem “Protestan”
Combo2.AddItem “Hindu”
Combo2.AddItem “Budha”
Combo2.AddItem “Kong Hu Chu”
End Sub

Private Sub HAPUS_Click()
perhatian = MsgBox(“Yakin akan dihapus?”, vbYesNo + vbExclamation, “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 “Data sudah yang paling akhir!”, vbOKOnly + vbInformation, “Perhatian”
End If
End With
End Sub

Private Sub MUNDUR_Click()
With Data1.Recordset
.MovePrevious
If .BOF Then
.MoveFirst
MsgBox “Data sudah yang paling awal!”, vbOKOnly + vbInformation, “Perhatian”
End If
End With
End Sub

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

Private Sub Option2_Click()
Text6.Visible = True
Text6.SetFocus
Text6.Width = 2655
Command1.Enabled = True
End Sub

Private Sub Option3_Click()
Text6.Visible = True
Text6.SetFocus
Text6.Width = 1000
Command1.Enabled = True
End Sub

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

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

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

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Len(Text1.Text) <> 8 Then
MsgBox “Maaf harus 8 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: