Membuat Data Karyawan Menggunakan Visual Basic

NAMA KOMPONEN PROPERTIES NILAI
Label1 Caption Judul
Label2 Caption Golongan
Label3 Caption Kode Status
Label4 Caption Status
Label5 Caption Tahun
Label6 Caption Jabatan
Label7 Caption Bagian
Label8 Caption Gaji Pokok
Label9 Caption Tunjangan
Label10 Caption Total Gaji
Frame1 Caption Tindakan
Label11 Caption Masukan Nama Karyawan
Label12 Caption Masukan NIK
Command1 Caption Proses
Command2 Caption Batal
Command3 Caption Lagi
Command4 Caption Keluar
Text1 – Text12 Text

KETENTUAN :

Golongan dan Jabatan :

A = Manager
Gaji Pokok = Rp 4.000.00
Tunjangan = Rp 1.025.00

B = Ka. Seksi
Gaji Pokok = Rp 3.500.00
Tunjangan = Rp 975.000

C = Staf
Gaji Pokok = Rp 3.000.00
Tunjangan = Rp 925.000

Status dan Kode Status :

  • S  = Single
  • M = Menikah
  • J = Janda
  • D = Duda

Bagian :

  • KEU = Accounting
  • ADM = Administrasi
  • SDM = General Affair
  • EDP = IT Unit
  • SPM = Security

SAMPEL :

Misal NIK : 2012A-S-ADM

Keterangan :

2012  = Menunjukan tahun
A       = Golongan
S        = Status
ADM = Bagian

SOURCE CODE

Private Sub Command1_Click()
Dim s As String
Text4.Text = Left(Text11.Text, 4)
s = Mid(Text11.Text, 5, 1)
If s = "A" Then
Text1.Text = "A"
Text5.Text = "Manager"
Text7.Text = "4000000"
Text8.Text = "1025000"
ElseIf s = "B" Then
Text1.Text = "B"
Text5.Text = "Ka.Seksi"
Text7.Text = "3500000"
Text8.Text = "975000"
ElseIf s = "C" Then
Text1.Text = "C"
Text5.Text = "Staf"
Text7.Text = "3000000"
Text8.Text = "925000"
End If
Text9.Text = Val(Text7) + Val(Text8)
s = Mid(Text11.Text, 7, 1)
If s = "S" Then
Text3.Text = "singel"
Text2.Text = "S"
ElseIf s = "M" Then
Text3.Text = "Menikah"
Text2.Text = "M"
ElseIf s = "J" Then
Text3.Text = "Janda"
Text2.Text = "J"
ElseIf s = "D" Then
Text3.Text = "Duda"
Text2.Text = "D"
End If
s = Mid(Text11.Text, 9, 3)
If s = "KEU" Then
Text6.Text = "Accounting"
ElseIf s = "ADM" Then
Text6.Text = "Administrasi"
ElseIf s = "SDM" Then
Text6.Text = "General Affair"
ElseIf s = "EDP" Then
Text6.Text = "IT Unit"
ElseIf s = "SPM" Then
Text6.Text = "Security"
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text10.SetFocus
End Sub
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text10.SetFocus
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Activate()
Text10.SetFocus
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text11.SetFocus
End If
End Sub

Catatan :

  • copy paste-kan source code di atas ke word terlebih dahulu apabila terjadi eror pada saat memasukan code
  • lalu copy source code yg ada di word lalu paste ke coding visual basic.

SELESAI….

  1. No trackbacks yet.

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

.

tips & trik | sharing | tutorial blog

tips & trik | sharing | tutorial blog

alian dika.stmikpswu

tips & trik | sharing | tutorial blog

CARI - CARI

tips & trik | sharing | tutorial blog

%d blogger menyukai ini: