ikutan nimbrung.... asumsi bentuk input : 00.00.00 Private Sub Command4_Click() Text2 = NextNRM(Text0) ====> nilai terakhir NomorMedicalRecord (NRM) bisa diambil dari tabel End Sub Function NextNRM(ByVal LastNRM) NRM1 = Val(Left(LastNRM, 2)) NRM3 = Val(Right(LastNRM, 2)) NRM2 = Val(Mid(LastNRM, 4, 2)) If NRM1 = 99 Then NRM1 = 0 NRM2 = NRM2 + 1 If NRM2 > 99 Then NRM2 = 0 NRM3 = NRM3 + 1 If NRM3 > 99 Then MsgBox "Full" End If End If Else NRM1 = NRM1 + 1 End If NextNRM = Format(NRM1, "00") & "." & Format(NRM2, "00") & "." & Format(NRM3, "00") End Function Salam, Application Developer & Consultant Website/Blog : Peta Industri dan Wisata Cilegon
komersilkan blog atau website anda dengan bergabung di sini atau di sini
--- On Fri, 21/12/12, Haer Talib <haertalib@gmail.com> wrote:
|
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (20) |
SPAM IS PROHIBITED
.
__,_._,___
No comments:
Post a Comment