Folman (080840028)
Rinaldi (080840020)
Senri (080840019)
Berliana (080840008)
Tampilann Awal Form
Jika Didadalam kolom Nim diisi dengan huruf maka akan mengeluarkan sebuah pemberitahuan bahwa huruf tidak dapat diisi dalam NIM Seperti gambar berikut
Dan jika kita mencoba memasukkan dengan Angka tetapi tidak sama dengan 9 maka akan ada pingatan bahwa yang didisi panjangnya harus sama dengan 9seperti gambar berikut
Samahalnya dengang pengisian nama jika kita mencoba untuk memasukkan dengan angka maka akan ada pemberitahuan bahwa data yang diinput harus huruf seperti gambar beriku
Jika dalam pengisian nama kita mencoba memasukkan dengan huruf tetapi panjangnya lebih dari 20 maka akan ada pepmberitahuan bahwa dalam pengisian nama hanya diperbolehkan maksimal 20 karakter saja seperti gambar berikut
Setelah selesai memasukkan data NIM,Nama Dan Alamat maka Botton Rekam Data Akan aktif seperti gambar berikut
Selanjutnya setelah kita menekan Botton Rekam Data maka Akan menuju form2 yang menyatakan bahwa data sudah direkam
dan setelah kita Menekan tombol Tampilan akan menuju form 3 yaitu form output data mahasiswa seperti gambar berikut
Source Code untuk Form Input data mahasiswa
Private Sub Command1_Click()
Form1.Visible = False
Form2.Show
Form2.Label2 = "DATA SUDAH DIREKAM"
Form2.Command1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text2.Enabled = False
Text3.Enabled = False
Option1.Value = True
Text1.SetFocus
End Sub
Private Sub Form_Load()
Text4.Visible = False
Text2.Enabled = False
Text3.Enabled = False
Command1.Enabled = False
Option1.Value = True
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Text4.Text = "pria"
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text4.Text = "wanita"
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox "NIM harus diisi"
ElseIf Not IsNumeric(Text1.Text) Then
MsgBox "data yang dimasukkan harus angka", vbOKOnly, "pesan system"
ElseIf Len(Text1.Text) <> 9 Then
MsgBox "NIM Harus 8", vbOKOnly, "Pesan system"
Else
Text2.Enabled = True
Text2.SetFocus
End If
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text2.Text = "" Then
MsgBox "Nama harus Diisi"
ElseIf IsNumeric(Text2.Text) Then
MsgBox "data yang dimasukkan hanya huruf", vbOKOnly, "pesan system"
ElseIf Len(Text2.Text) = 35 Then
MsgBox "Nama Maxsimum 20", vbOKOnly, "pesan sytem"
Else
Text3.Enabled = True
Text3.SetFocus
End If
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text3.Text = "" Then
MsgBox " Alamat harus Diisi"
Else
Option1.Value = True
Command1.Enabled = True
Command1.SetFocus
End If
End If
End Sub
Form1.Visible = False
Form2.Show
Form2.Label2 = "DATA SUDAH DIREKAM"
Form2.Command1.SetFocus
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text2.Enabled = False
Text3.Enabled = False
Option1.Value = True
Text1.SetFocus
End Sub
Private Sub Form_Load()
Text4.Visible = False
Text2.Enabled = False
Text3.Enabled = False
Command1.Enabled = False
Option1.Value = True
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Text4.Text = "pria"
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text4.Text = "wanita"
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox "NIM harus diisi"
ElseIf Not IsNumeric(Text1.Text) Then
MsgBox "data yang dimasukkan harus angka", vbOKOnly, "pesan system"
ElseIf Len(Text1.Text) <> 9 Then
MsgBox "NIM Harus 8", vbOKOnly, "Pesan system"
Else
Text2.Enabled = True
Text2.SetFocus
End If
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text2.Text = "" Then
MsgBox "Nama harus Diisi"
ElseIf IsNumeric(Text2.Text) Then
MsgBox "data yang dimasukkan hanya huruf", vbOKOnly, "pesan system"
ElseIf Len(Text2.Text) = 35 Then
MsgBox "Nama Maxsimum 20", vbOKOnly, "pesan sytem"
Else
Text3.Enabled = True
Text3.SetFocus
End If
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text3.Text = "" Then
MsgBox " Alamat harus Diisi"
Else
Option1.Value = True
Command1.Enabled = True
Command1.SetFocus
End If
End If
End Sub
Source Code untuk Form 2 yaitu Rekam Data
Private Sub Command1_Click()
Form2.Visible = False
Form3.Show
Form3.Text1.Text = Form1.Text1.Text
Form3.Text2.Text = Form1.Text2.Text
Form3.Text3.Text = Form1.Text3.Text
Form3.Text4.Text = Form1.Text4.Text
Form3.Command1.SetFocus
End Sub
Form2.Visible = False
Form3.Show
Form3.Text1.Text = Form1.Text1.Text
Form3.Text2.Text = Form1.Text2.Text
Form3.Text3.Text = Form1.Text3.Text
Form3.Text4.Text = Form1.Text4.Text
Form3.Command1.SetFocus
End Sub
Source Code untuk Form output data mahasiswa
Private Sub Command1_Click()
End
End Sub
End
End Sub










