Project Input Data Mahasiswa Menggunakan Visual Basic 6.0

Pada ketika penerimaan mahasiswa gres pasti nya akan memakan banyak waktu untuk menginput data mahasiswa satu persatu. dengan adanya teknologi akan mempercepat kinerja kita bahkan dua kali lipat dari kerja secara manual.

Ada banyak aplikasi yang mampu di gunakan untuk membuat program mendaftarkan data mahasiswa, salah satu nya yaitu visual basic 6.0. ada beberapa alasan mengapa aku merekomendasikan menggunakan aplikasi desktop ini, pertama mudah di pahami alasannya yakni bahasa yang digunakan yakni bahasa tingkat tinggi (high level language), yang kedua aplikasi ini masih banyak di gunakan di kalangan kita pola nya pada toko penjualan pakaian, manajemen kampus dan dealer motor masih menggunakan visual basic 6.0.

selain agenda input data mahaswa kita juga mampu membuat agenda menghitung nilai mahasiswa, silahkan baca artikel kita sebelumnya pola program visual basic 6.0 menghitung nilai mahasiswa.

Membuat Form Biodata Dengan Visual Basic 6.0

oke, kita lanjut membuat input biodata, sesuaikan dengan harapan masing-masing.

#1 Buka aplikasi visual basic 6.0.

#2 Buat sebuah database, menggunakan Microsoft Access seuaikan dengan gambar berikut :

Project Input Data Mahasiswa Menggunakan Visual Basic 6.0

#3 Buat module untuk meletakkan koneksi nya, atau mampu eksklusif letak di form load.

#4 Kemudian desain form sesuai dengan gambar di bawah : 

Project Input Data Mahasiswa Menggunakan Visual Basic 6.0

#5 Masukkan Coding berikut, sesuaikan apa yang perlu di ubah.
 Sub BERSIH() T1 = clear T2 = clear T3 = clear T4 = clear T5 = clear T6 = clear T7 = "__/__/____" T8 = clear T9 = clear T10 = clear T11 = clear T12 = clear BM = False SM = False T1.SetFocus End Sub Private Sub Cc_Click() Call BERSIH End Sub  Private Sub Ccari_Click() Dim cari As String cari = InputBox("KETIK NIM YANG ANDA CARI") Rb.Open "Select * from Mahasiswa where NIM = '" & cari & "' ", konek, adOpenKeyset, adLockPessimistic If Rb.EOF = False Then     T1 = Rb!NIM     T2 = Rb!Nama     T3 = Rb!Jekel     T4 = Rb!PENDD     T5 = Rb!AGAMA     T6 = Rb!SMUAsa     T7 = Rb!Tgl_Lahir     T8 = Rb!Tpt_Lahir     T9 = Rb!Kota_Asal     T10 = Rb!Alamat     T11 = Rb!NoHP     T12 = Rb!JLH_SDR     If Rb!Sts_Nikah = True Then         BM.Value = False         SM.Value = True     Else         BM.Value = True         SM.Value = False     End If Else     MsgBox "NIM YANG ANDA MASUKKAN TIDAK COCOK...!", vbCritical, "Kesalahan" End If Rb.Close 'T2.Enabled = True 'T3.Enabled = True 'T4.Enabled = True 'T5.Enabled = True 'T6.Enabled = True 'T7.Enabled = True 'T8.Enabled = True 'T9.Enabled = True 'T10.Enabled = True 'T11.Enabled = True 'T12.Enabled = True End Sub  Private Sub Ch_Click() If T1 = "" Or T2 = "" Or T3 = "" Or T4 = "" Or T5 = "" Or T6 = "" Or T7 = "__/__/____" Or T8 = "" Or T9 = "" Or T10 = "" Or T11 = "" Or T12 = "" Then MsgBox "SILAHKAN KLIK CARI SEBELUM DI HAPUS", vbInformation, "INFORMASI" Else konek.Execute " delete from mahasiswa where nim='" & T1 & "' " Call BERSIH MsgBox "nim telah berhasil di DELETE !", vbInformation, "Informasi" End If End Sub  Private Sub Cp_Click() Dim StsNkh As Boolean If T1 = "" Or T2 = "" Or T3 = "" Or T4 = "" Or T5 = "" Or T6 = "" Or T7 = "__/__/____" Or T8 = "" Or T9 = "" Or T10 = "" Or T11 = "" Or T12 = "" Then MsgBox "SILAHKAN KLIK CARI SEBELUM DI UPDATE", vbInformation, "INFORMASI" Else If BM.Value = True Then StsNkh = False ElseIf SM.Value = True Then StsNkh = True Else StsNkh = False End If konek.Execute "update mahasiswa set nama='" & T2 & "',jekel='" & T3 & "',pendd='" & T4 & "',agama='" & T5 & "',smuasa='" & T6 & "',tgl_lahir='" & Format(T7, "DD/MM/YYYY") & "',tpt_lahir='" & T8 & "',kota_asal='" & T9 & "',alamat='" & T10 & "',nohp='" & T11 & "',jlh_sdr=" & Val(T12) & ",sts_nikah=" & StsNkh & " where nim='" & T1 & "'" MsgBox "NIM : " & T1 & " , telah berhasil di UPDATE !", vbInformation, "Informasi" End If End Sub  Private Sub Cs_Click() If T1 = "" Or T2 = "" Or T3 = "" Or T4 = "" Or T5 = "" Or T6 = "" Or T7 = "__/__/____" Or T8 = "" Or T9 = "" Or T10 = "" Or T11 = "" Or T12 = "" Then MsgBox "SEMUA KOLOM HARUS DI ISI", vbInformation, "INFORMASI" End If If Not IsDate(T7.Text) Then MsgBox "Tanggal Tidak Valid" T7.SetFocus Else If SM.Value = True Then  StsNkh = True  Else  StsNkh = False  End If  rc.Open "Select * from mahasiswa where NIM = '" & T1 & "' ", konek, adOpenKeyset, adLockPessimistic If rc.EOF = False Then MsgBox "DATA YANG TELAH ADA TIDAK BISA DI SIMPAN " & vbNewLine & "HANYA BISA DI PERBAHARUI", vbInformation, "Informasi" Else konek.Execute "insert into mahasiswa values('" & T1 & "', '" & T2 & "', '" & T3 & "', '" & T4 & "', '" & T5 & "', '" & T6 & "','" & Format(T7, "dd/mm/yyyy") & "', '" & T8 & "', '" & T9 & "', '" & T10 & "', '" & T11 & "', '" & T12 & "', " & StsNkh & ")" MsgBox "Data Telah Di Simpan ....", vbInformation, "Informasi" End If rc.Close End If End Sub  Private Sub CSelesai_Click() Unload Me End Sub  Private Sub MaskEdBox1_KeyPress(KeyAscii As Integer)  End Sub  Private Sub Form_Activate() T1.SetFocus End Sub  Private Sub T1_KeyPress(KeyAscii As Integer)  T1.MaxLength = 8 'Validasi Agar Hanya Bisa Menginput Angka Tanpa Spasi If Not (KeyAscii >= Asc("0") & Chr(13) And KeyAscii <= Asc("9") & Chr(13) Or KeyAscii = vbKeyBack Or KeyAscii = vbKeyReturn) Then KeyAscii = 0 End If If KeyAscii = 13 Then                   Rb.Open "select nim from mahasiswa where nim='" & T1 & "' ", konek, adOpenKeyset, adLockOptimistic     If Rb.EOF = False Then         MsgBox "Data dengan NIM : " & T1 & " , sudah ada.... Ganti dengan yang baru"         T1 = clear         T1.SetFocus         Else         T2.SetFocus     End If     Rb.Close End If End Sub  Private Sub T2_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then 'T3.Enabled = True T3.SetFocus End If  'Validasi Agar Hanya Bisa Menuliskan Huruf Saja Dengan ( SPACI, BACK DAN DELETE ) If Not (KeyAscii >= Asc("a") & Chr(13) And KeyAscii <= Asc("z") & Chr(13) Or (KeyAscii >= Asc("A") & Chr(13) And KeyAscii <= Asc("Z") & Chr(13) Or KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace)) Then KeyAscii = 0 End If  End Sub Private Sub T3_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then 'T4.Enabled = True T4.SetFocus End If End Sub Private Sub T4_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then 'T5.Enabled = True T5.SetFocus End If End Sub Private Sub T5_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then 'T6.Enabled = True T6.SetFocus End If End Sub  Private Sub T6_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then 'T7.Enabled = True T7.SetFocus End If End Sub  Private Sub T7_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then 'T8.Enabled = True T8.SetFocus End If End Sub Private Sub T8_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then T9.SetFocus End If End Sub Private Sub T9_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then T10.SetFocus End If End Sub Private Sub T10_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then T11.SetFocus End If End Sub Private Sub T11_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) If KeyAscii = 13 Then T12.SetFocus End If End Sub 

#4 Run.

Sekian Project Input Data Mahasiswa Menggunakan Visual Basic 6.0, kalau ada yang membingungkan silahkan tanyakan di kolom komentar.
Share This :

Related Post



sentiment_satisfied Emoticon