G
Graham R Seach
Pedro,
Public Function GetNextNumber() As String
Dim sTemp As String
sTemp = Format(Date, "mmddyyyy")
GetNextNumber = sTemp & Format(Nz(DMax("Mid(mynumber,9)", _
"mytable", "Left(mynumber, 8) = """ & sTemp & """"), 0) + 1, "000")
End Function
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
Public Function GetNextNumber() As String
Dim sTemp As String
sTemp = Format(Date, "mmddyyyy")
GetNextNumber = sTemp & Format(Nz(DMax("Mid(mynumber,9)", _
"mytable", "Left(mynumber, 8) = """ & sTemp & """"), 0) + 1, "000")
End Function
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia