TUGAS VIBI II

                    FORM KATA SANDI

FORM7

Private Sub Command1_Click()
Dim Cari As String * 50
Cari = Text1.Text
With Data1.Recordset
.Index = “SandiIndex”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “Maaf Kanta Sandinya Salah, Coba Lagi!”, vbInformation, “Perhatian”
Text1.Text = “”
Text1.SetFocus
Else
Form8.Show
Form7.Hide
End If
End With
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Form7.Height = 4740
Frame2.Visible = True
Text2.SetFocus
End Sub

Private Sub Command4_Click()
If Text3.Text = Text4.Text Then
Form7.Height = 2460
Data1.Recordset.Edit
Data1.Recordset.Fields!kata_sandi = Text3.Text
Data1.Recordset.Update
Else
MsgBox “Konfirmasi yang anda masukkan tidak sesuai dengan Kata Sandi yang baru!?!”, vbCritical, “Peringatan”
Text3.Text = “”
Text4.Text = “”
Text3.SetFocus
End If
End Sub

Private Sub Form_Activate()
Form7.Height = 2460
Text1.SetFocus
End Sub

Private Sub Text1_Change()
Command1.Default = True
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim Cari As String * 50
Cari = Text2.Text
With Data1.Recordset
.Index = “SandiIndex”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “Maaf Kanta Sandinya Salah, Coba Lagi!”, vbInformation, “Perhatian”
Text2.Text = “”
Text2.SetFocus
Else
Text3.SetFocus
End If
End With
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub

                 FORM MENU UTAMA

form8
Private Sub InputMHS_Click()
Form1.Show
Form8.Hide
End Sub

Private Sub InputMK_Click()
Form2.Show
Form8.Hide
End Sub

Private Sub khs_Click()
Form6.Show
Form8.Hide
End Sub

Private Sub KRS_Click()
Form5.Show
Form8.Hide
End Sub

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

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

Private Sub Selesai_Click()
End
End Sub

FORM1

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

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

Private Sub Form_Activate()
Frame1.Enabled = False
TAMBAH.Enabled = True
SIMPAN.Enabled = False
SELESAI.Enabled = True
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 MAJU_Click()
With Data1.Recordset
.MoveNext
If .EOF Then
.MoveLast
MsgBox “Data Paling Akhir!”, vbInformation, “Perhatian”
End If
End With
End Sub

Private Sub MUNDUR_Click()
With Data1.Recordset
.MovePrevious
If .BOF Then
.MoveFirst
MsgBox “Data Paling Awal!”, vbInformation, “Perhatian”
End If
End With
End Sub

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

Private Sub SIMPAN_Click()
Data1.Recordset.Update
TAMBAH.Enabled = True
SIMPAN.Enabled = False
SELESAI.Enabled = True
Frame1.Enabled = False
Frame3.Enabled = True
End Sub

Private Sub TAMBAH_Click()
TAMBAH.Enabled = False
SIMPAN.Enabled = True
SELESAI.Enabled = False
Data1.Recordset.AddNew
Frame3.Enabled = False
Frame1.Enabled = True
Text1.SetFocus
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
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
DTPicker1.SetFocus
End If
End Sub

FORM DATA MATA KULIAH

FORM2

Private Sub TAMBAH_Click()
TAMBAH.Enabled = False
SIMPAN.Enabled = True
SELESAI.Enabled = False
Data1.Recordset.AddNew
Frame3.Enabled = False
Frame1.Enabled = True
Text1.SetFocus
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
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub SIMPAN_Click()
Data1.Recordset.Update
TAMBAH.Enabled = True
SIMPAN.Enabled = False
SELESAI.Enabled = True
Frame1.Enabled = False
Frame3.Enabled = True
End Sub
Private Sub Selesai_Click()
Form8.Show
Form2.Hide
End Sub
Private Sub AWAL_Click()
Data1.Recordset.MoveFirst
End Sub

Private Sub Form_Activate()
Frame1.Enabled = False
TAMBAH.Enabled = True
SIMPAN.Enabled = False
SELESAI.Enabled = True
End Sub

Private Sub MAJU_Click()
With Data1.Recordset
.MoveNext
If .EOF Then
.MoveLast
MsgBox “Data Paling Akhir!”, vbInformation, “Perhatian”
End If
End With
End Sub

Private Sub MUNDUR_Click()
With Data1.Recordset
.MovePrevious
If .BOF Then
.MoveFirst
MsgBox “Data Paling Awal!”, vbInformation, “Perhatian”
End If
End With
End Sub
Private Sub AKHIR_Click()
Data1.Recordset.MoveLast
End Sub

 

   FORM PENGOLAHAN DATA MAHASISWA

FORM3

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

      FORM DATA MATAKULIAH

FORM4

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

                 FORM PENGISIAN KRS

FORM5

Private Sub CETAK_Click()
Form9.Show
Form5.Hide
End Sub

Private Sub Combo1_Click()
Text3.SetFocus
End Sub

Private Sub Form_Load()
Combo1.AddItem “I”
Combo1.AddItem “II”
Combo1.AddItem “III”
Combo1.AddItem “IV”
Combo1.AddItem “V”
Combo1.AddItem “VI”
End Sub

Private Sub HAPUS_Click()
perhatian = MsgBox(“Yakin ingin dihapus?”, vbYesNo + vbInformation, “Peringatan”)
If perhatian = vbYes Then
khs.Recordset.Delete
khs.Recordset.MoveNext
Else
khs.Refresh
End If
End Sub

Private Sub perbaikan_Click()
SIMPAN.Caption = “Simpan Ulang”
TAMBAH.Enabled = False
SIMPAN.Enabled = True
HAPUS.Enabled = False
CETAK.Enabled = False
SELESAI.Enabled = False
PERBAIKAN.Enabled = False
End Sub

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

Private Sub SIMPAN_Click()
If SIMPAN.Caption = “Simpan” Then
With khs.Recordset
.AddNew
.Fields!KD_MK = Text2.Text
.Fields!npm = Text1.Text
.Fields!NM_MK = Label9.Caption
.Fields!NM_MHS = Label8.Caption
.Fields!sks = Label10.Caption
.Fields!pembimbing = Text3.Text
.Fields!SMSTER = Combo1.Text
.Update
End With
Else
With khs.Recordset
.Edit
.Fields!KD_MK = Text2.Text
.Fields!npm = Text1.Text
.Fields!NM_MK = Label9.Caption
.Fields!NM_MHS = Label8.Caption
.Fields!sks = Label10.Caption
.Fields!pembimbing = Text3.Text
.Fields!smseter = Combo1.Text
.Update
End With
End If
TAMBAH.Enabled = True
SIMPAN.Enabled = False
HAPUS.Enabled = True
CETAK.Enabled = True
SELESAI.Enabled = True
PERBAIKAN.Enabled = True
End Sub

Private Sub TAMBAH_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Combo1.Text = “”
Label8.Caption = “”
Label9.Caption = “”
Label10.Caption = “”
Text1.SetFocus
TAMBAH.Enabled = False
SIMPAN.Enabled = True
HAPUS.Enabled = False
CETAK.Enabled = False
SELESAI.Enabled = False
PERBAIKAN.Enabled = False
End Sub

Private Sub TAMBAHKULIAH_Click()
Text2.Text = “”
Label9.Caption = “”
Label10.Caption = “”
Text2.SetFocus
TAMBAH.Enabled = False
SIMPAN.Enabled = True
HAPUS.Enabled = False
CETAK.Enabled = False
SELESAI.Enabled = False
PERBAIKAN.Enabled = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim Cari As String
If KeyAscii = 13 Then
Cari = Text1.Text
With mhs.Recordset
.Index = “NPMX”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “NPM yang anda masukkan tidak terdaftar, silahkan cek NPM anda!”, vbInformation, “Perhatian”
Text1.Text = “”
Text1.SetFocus
Else
Label8.Caption = .Fields!NM_MHS
End If
End With
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
Dim Cari As String
If KeyAscii = 13 Then
Cari = Text2.Text
With kuliah.Recordset
.Index = “KODEX”
.Seek “=”, Cari
If .NoMatch Then
MsgBox “Kode yang anda masukkan tidak terdaftar, silahkan cek Kode dengan benar!”, vbInformation, “Perhatian”
Text2.Text = “”
Text2.SetFocus
Else
Label9.Caption = .Fields!NM_MK
Label10.Caption = .Fields!sks
End If
End With
End If

End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

          FORM PENGISIAN KHS
FORM6

Private Sub Command2_Click()
With Data1.Recordset
.Edit
.Fields!am = am.Caption
.Fields!HM = Text3.Text
.Fields!kam = kam.Caption
.Update
End With
DBGrid1.Refresh
End Sub

Private Sub Command3_Click()
Form10.Show
Form6.Hide
End Sub

Private Sub LANJUT_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Kode.Caption = “”
am.Caption = “”
kam.Caption = “”
Nama.Caption = “”
kuliah.Caption = “”
End Sub

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

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim Cari As String
Cari = “NPM= ‘” & Text1.Text & ” ‘ And KD_MK = ‘” & Text2.Text & “‘”
With Data1.Recordset
.FindFirst Cari
If .NoMatch Then
MsgBox “Data yang dicari tidak ada”, vbInformation + vbOKOnly, “Perhatian”
Else
Text1.Text = .Fields!npm
Text2.Text = .Fields!KD_MK
sks.Caption = .Fields!sks
Kode.Caption = .Fields!SMSTER
Nama.Caption = .Fields!NM_MHS
kuliah.Caption = .Fields!NM_MK
Text3.SetFocus
End If
End With
End If
End Sub

Private Sub Text3_Change()
Dim totalnilai, totalsks, ip As Variant
Dim mutu, beban, skam As Long
Dim HM As String
HM = Text3.Text
beban = Val(sks.Caption)
If HM = “A” Or HM = “a” Then
mutu = 4
ElseIf HM = “B” Or HM = “b” Then
mutu = 3
ElseIf HM = “C” Or HM = “c” Then
mutu = 2
ElseIf HM = “D” Or HM = “d” Then
mutu = 1
Else
mutu = 0
End If
skam = beban * mutu
am.Caption = mutu
kam.Caption = skam

End Sub

                     FORM CETAK KRS

form9

Private Sub Command1_Click()
ckrs.WindowState = crptMaximized
ckrs.SelectionFormula = “{KHS.NPM} ='” & Text1.Text & “‘ AND {KHS.SMSTER} ='” & Combo1.Text & “‘”
ckrs.RetrieveDataFiles
ckrs.Action = 1
End Sub

Private Sub Command2_Click()
Form9.Hide
Form8.Show
End Sub

Private Sub Form_Activate()
Text1.SetFocus
End Sub

Private Sub Form_Load()
Combo1.AddItem “I”
Combo1.AddItem “II”
Combo1.AddItem “III”
Combo1.AddItem “IV”
Combo1.AddItem “V”
Combo1.AddItem “VI”
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s