An expert just helped by with a situation where I am trying to autonumber a text field.
The new situation is I have a text field that looks like this: SP14-00170. The next new record should be SP14-00171.
The solution in the previous topic was to create a query with one field that looked like:
And then use this code in the before insert event of the form:
If Me.NewRecord = True Then
Dim NewNum As String
NewNum = DMax("LastTaskCardN", "qryLastSAItaskCardN")
Me.txtSAItaskCardN = "TC-" & Format(CInt(NewNum) + 1, "0000")
But now my new situation is different (SP14-00170) instead of AB-1023 in the other topic.
How can I accomplish the same thing which SP14-00170 instead of AB-1023 ??