Coding/Listing :
Sub aktif()
txtkdkasir.Enabled = True
txtkdkue.Enabled = True
txtnmkue.Enabled = True
txtharga.Enabled = True
txtjenis.Enabled = True
txtstok.Enabled = True
txtjam.Enabled = True
txttanggal.Enabled = True
End Sub
Sub nonaktif()
txtkdkasir.Enabled = False
txtkdkue.Enabled = False
txtnmkue.Enabled = False
txtharga.Enabled = False
txtjenis.Enabled = False
txtstok.Enabled = False
txtjam.Enabled = False
txttanggal.Enabled = False
End Sub
Sub bersih()
txtkdkasir.Text = ""
txtkdkue.Text = ""
txtnmkue.Text = ""
txtharga.Text = ""
txtjenis.Text = ""
txtstok.Text = ""
End Sub
Private Sub Timer1_Timer()
txtjam.Text = Time
txttanggal.Text = Format(Date, "dd / mm / yy")
End Sub
Private Sub Form_Activate()
nonaktif
bersih
cmdtambah.Enabled = True
cmdtambah.SetFocus
End Sub
Private Sub cmdtambah_Click()
aktif
bersih
txtkdkasir.SetFocus
txtjam.Enabled = False
txttanggal.Enabled = False
End Sub
Private Sub txtkdkasir_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtkdkue.SetFocus
End If
End Sub
Private Sub cmdsimpan_Click()
With dtkue.Recordset
.AddNew
!kode_kue = txtkdkue.Text
!nama_kue = txtnmkue.Text
!jenis_kue = txtjenis.Text
!harga = txtharga.Text
!stok = txtstok.Text
.Update
.MoveLast
nonaktif
End With
End Sub
Private Sub cmdkeluar_Click()
p = MsgBox("Yakin Ingin Keluar...?!", vbQuestion + vbYesNo, "Konfirmasi")
If p = vbYes Then
End
End If
End Sub
Private Sub cmdtop_Click()
On Error Resume Next
dtkue.Recordset.MoveFirst
MsgBox "Data Sudah Diawal Record!", vbCritical, "Pesan"
End Sub
Private Sub cmdbott_Click()
On Error Resume Next
dtkue.Recordset.MoveLast
MsgBox "Data Sudah Diakhir Record!", vbCritical, "Pesan"
End Sub
Private Sub cmdback_Click()
On Error Resume Next
dtkue.Recordset.MovePrevious
If dtkue.Recordset.BOF Then
dtkue.Recordset.MoveFirst
MsgBox "Sudah Diawal Record!", vbCritical, "Pesan"
End If
End Sub
Private Sub cmdnext_Click()
On Error Resume Next
dtkue.Recordset.MoveNext
If dtkue.Recordset.EOF Then
dtkue.Recordset.MoveLast
MsgBox "Sudah Diakhir Record!", vbCritical, "Pesan"
End If
End Sub
Sub aktif()
txtkdkasir.Enabled = True
txtkdkue.Enabled = True
txtnmkue.Enabled = True
txtharga.Enabled = True
txtjenis.Enabled = True
txtstok.Enabled = True
txtjam.Enabled = True
txttanggal.Enabled = True
End Sub
Sub nonaktif()
txtkdkasir.Enabled = False
txtkdkue.Enabled = False
txtnmkue.Enabled = False
txtharga.Enabled = False
txtjenis.Enabled = False
txtstok.Enabled = False
txtjam.Enabled = False
txttanggal.Enabled = False
End Sub
Sub bersih()
txtkdkasir.Text = ""
txtkdkue.Text = ""
txtnmkue.Text = ""
txtharga.Text = ""
txtjenis.Text = ""
txtstok.Text = ""
End Sub
Private Sub Timer1_Timer()
txtjam.Text = Time
txttanggal.Text = Format(Date, "dd / mm / yy")
End Sub
Private Sub Form_Activate()
nonaktif
bersih
cmdtambah.Enabled = True
cmdtambah.SetFocus
End Sub
Private Sub cmdtambah_Click()
aktif
bersih
txtkdkasir.SetFocus
txtjam.Enabled = False
txttanggal.Enabled = False
End Sub
Private Sub txtkdkasir_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtkdkue.SetFocus
End If
End Sub
Private Sub cmdsimpan_Click()
With dtkue.Recordset
.AddNew
!kode_kue = txtkdkue.Text
!nama_kue = txtnmkue.Text
!jenis_kue = txtjenis.Text
!harga = txtharga.Text
!stok = txtstok.Text
.Update
.MoveLast
nonaktif
End With
End Sub
Private Sub cmdkeluar_Click()
p = MsgBox("Yakin Ingin Keluar...?!", vbQuestion + vbYesNo, "Konfirmasi")
If p = vbYes Then
End
End If
End Sub
Private Sub cmdtop_Click()
On Error Resume Next
dtkue.Recordset.MoveFirst
MsgBox "Data Sudah Diawal Record!", vbCritical, "Pesan"
End Sub
Private Sub cmdbott_Click()
On Error Resume Next
dtkue.Recordset.MoveLast
MsgBox "Data Sudah Diakhir Record!", vbCritical, "Pesan"
End Sub
Private Sub cmdback_Click()
On Error Resume Next
dtkue.Recordset.MovePrevious
If dtkue.Recordset.BOF Then
dtkue.Recordset.MoveFirst
MsgBox "Sudah Diawal Record!", vbCritical, "Pesan"
End If
End Sub
Private Sub cmdnext_Click()
On Error Resume Next
dtkue.Recordset.MoveNext
If dtkue.Recordset.EOF Then
dtkue.Recordset.MoveLast
MsgBox "Sudah Diakhir Record!", vbCritical, "Pesan"
End If
End Sub
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :