Sub auto()
Dim urutan As String * 11
Dim hitung As Byte
With Data1.Recordset
If .RecordCount = 0 Then
urutan = "IO-937-001"
Else
.MoveLast
hitung = Val(Right(.Fields("Nomor"), 3)) + 1
urutan = Right("IO-937-00" & hitung, 11)
End If
TxtNomor = urutan
End With
End Subhasil dari source code diatas sbb: IO-937-001.tapi waktu urutan 10 ke atas nox IO-937-0010,seharusx IO- 937-010 dan kalo urutan 100 keatas nox IO-937-00100, seharusnya IO-937-100 makasih banyak... aq baru belajar VB
