Coba kl fungsinya jadi begini:
Public Function GetNo(pTGL As Date) As String
Dim strDummy As String
strDummy = Nz(DMax("right([no],4)", "Tinput", "left([no],8)='" & Format(pTGL, "ddmmyyyy") & "'"))
If strDummy = "" Then
GetNo = Format(pTGL, "dd") & Format(pTGL, "mm") & Format(pTGL, "yyyy") & "0001"
Else
GetNo = Format(pTGL, "dd") & Format(pTGL, "mm") & Format(pTGL, "yyyy") & Format(Val(strDummy) + 1, "0000")
End If
End Function
Smoga bermanfaat.
Salam,
Coyev
--- In belajar-access@yahoogroups.com, Afrizal <aflazio7@...> wrote:
>
>
> para master access
>
> saya ada masalah untuk membuat no registrasi. saya mendapat contoh dr milis ini. tp pada saat saya praktek dalam form sy no registrasi ya selalu di satu nomor aja tidak berganti.
> contoh no ya.
> 080120120001
> seharusnya akan berlanjut ke 080120120002. tp yg tampil tetap no 080120120001.
>
>
> mohon solusi ya.... (file terlampir)
>
> terima kasih banyak
>
> Afrizal
>
Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
No comments:
Post a Comment