Private Sub Tgl_Input_AfterUpdate()
Me.No_Urut = DCount("[Tgl_Input]", "TblNoUrut", "[Tgl_Input] = #" & Format(Tgl_Input, "mm/dd/yyyy") & "#") + 1
End Sub
Usahkan format Tgl_Input yang ditable dan kriteria dcount harus sama.
From: cecep <cepwahyu@gmail.com>
To: belajar-access@yahoogroups.com
Sent: Tuesday, 12 March 2013 9:55 AM
Subject: [belajar-access] Nomor urut otomatis [1 Attachment]
Me.No_Urut = DCount("[Tgl_Input]", "TblNoUrut", "[Tgl_Input] = #" & Format(Tgl_Input, "mm/dd/yyyy") & "#") + 1
End Sub
Usahkan format Tgl_Input yang ditable dan kriteria dcount harus sama.
salam
Nurhasim Hasan
Nurhasim Hasan
From: cecep <cepwahyu@gmail.com>
To: belajar-access@yahoogroups.com
Sent: Tuesday, 12 March 2013 9:55 AM
Subject: [belajar-access] Nomor urut otomatis [1 Attachment]
Hallo para access mania,
Bagimana membuat nomor urut secara otomatis terisi pada salah satu field?
Saya buat table (TblNoUrut) :
ID
Tgl_Input
No_Urut
Kemudian saya buat form dan sourcnya dari tgl tsb, proses inputnya saya masukan tanggal kemudian saya ingin secara otomatis field No_Urut secara otomatis terisi dengan nomor urut.
ID Tgl_Input No_Urut
1 01-03-13 1
2 01-03-13 2
3 01-03-13 3
4 02-03-13 1
5 02-03-13 2
6 03-03-13 1
7 03-03-13 2
Jadi kalo tanggal sama maka No_Urut secara otomatis nambah terus, kalo tanggal berbeda maka No_Urut kembali dimulai dari no 1 dst…
Tolong dibantu ya bagaimana coding-nya?
Saya lampirkan juga sample database-nya tapi No_Urutnya masih manual
Best Regards
CW
__._,_.___
| Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (2) |
SPAM IS PROHIBITED
.
__,_._,___
Tidak ada komentar:
Posting Komentar