memasukkan database di VB

dtbs
Private Sub Cmdbaru_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub

Private Sub Cmddpros_Click()
Dim s As String
Text5.Text = “20” & Left(Text2.Text, 2)
s = Mid(Text2.Text, 3, 1)
If s = “1” Then
Text3.Text = “Sistem Informasi”
ElseIf s = “2” Then
Text3.Text = “Manajemen Informatika”
ElseIf s = “3” Then
Text3.Text = “Manajemen Akuntansi”
ElseIf s = “4” Then
Text3.Text = “Tenik Informatika”
End If

s = Mid(Text2.Text, 4, 2)
If s = “01” Then
Text4.Text = “Strata Satu”
Text7.Text = “1950000”
ElseIf s = “02” Then
Text4.Text = “Diploma Empat”
Text7.Text = “1750000”
ElseIf s = “03” Then
Text4.Text = “Diploma Tiga”
Text7.Text = “1650000”
ElseIf s = “04” Then
Text4.Text = “Diploma Dua”
Text7.Text = “1450000”
End If

Text6 = Right(Text2.Text, 3)
End Sub

Private Sub Cmdexit_Click()
Data1.Recordset.Edit
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
End Sub

Private Sub Cmdkeluar_Click()
Data1.Recordset.Close
End Sub

Private Sub Cmdsimpan_Click()
Data1.Recordset.Update
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
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