Source Kode dibawah ini adalah listing untuk membuat no faktur otomatis. No faktur otomatis ini terdiri dari tahun, bulan, tanggal serta no urut transaksi.
Sub fak()
Adotransaksi.RecordSource = "Select*from transaksi where notrans in(select max(notrans)from transaksi)order by notrans desc"
Adotransaksi.Refresh
Dim urutan As String * 9
Dim hitung As Long
With Adotransaksi
If .Recordset.EOF Then
urutan = Right(Date, 2) + Mid(Date, 4, 2) + Left(Date, 2) + "001"
NoTrans.Text = urutan
Else
If Left(.Recordset!NoTrans, 6) <> Right(Date, 2) + Mid(Date, 4, 2) + Left(Date, 2) Then
urutan = Right(Date, 2) + Mid(Date, 4, 2) + Left(Date, 2) + "001"
Else
.Recordset.MoveLast
hitung = (.Recordset!NoTrans) + 1
urutan = (Right(Date, 2) + Mid(Date, 4, 2) + Left(Date, 2)) + Right("000" + hitung, 3)
End If
End If
NoTrans.Text = urutan
End With
End Sub
Semoga Membantuu . .
- 2012 (1)
-
2011
(15)
- Oktober(1)
-
Mei(14)
- FROM BANDUNG WITH LOVE - Cinema 21
- 32 ciri-ciri pasangan selingkuh ( Versi Bahasa Ind...
- 32 characteristics of cheating spouse (English Ver...
- Lirik lagu Last Child "Lagu Terakhir Untukmu"
- My Place Memorry
- Lirik Lagu Wali " DoaKu Untuk Mu Sayang "
- opmin_multy_operator-_handler_by_ryan.jar
- Asphalt_4_176x220_3D_sew810_rus.jar
- Asphalt_4_240x320_2D_rus.jar
- ferrari_gt_240x320.jar
- Block Breaker Deluxe 2 [240x320].jar
- Manfaat Dan Kerugian Pacaran Jarak Jauhh
- Mempertahankan Hubungan Jarak Jauhh
- Membuat No Faktur Otomatis Pada VB 6.0
2 komentar:
Adotransaksi nya di declare dimana gan?
gan bisa minta programnya gak,,soalnya saya binggung memahaminya lg belajar nie...email : vanliu22@gmail.com
terimakasih
Posting Komentar