D
dan.cawthorne
Hi All,
Some one once created a very simple put useful auto number generator
the following code was used, and did what i needed.
Private Sub Form_Current()
If Me.NewRecord Then
Me!ProjectQNo = "Q" & _
Format(CLng(Nz(DMax("Mid(ProjectQNo,2,4)", "tbl_Projects", _
"Right(ProjectQNo,2)='" & Format(Date, "yy") & "'"), "0")) +
1, _
"0000") & Format(Date, "yy")
End If
End Sub
it actual looked at the Highest number in the ProjectQNo Field with in
the tbl_Projects and then worked out the next number to issue eg
Q374008 .
I Need a Similar code that would produce a number e.g C3750 but for it
not to reset the beginning of the year. can this me done?
Some one once created a very simple put useful auto number generator
the following code was used, and did what i needed.
Private Sub Form_Current()
If Me.NewRecord Then
Me!ProjectQNo = "Q" & _
Format(CLng(Nz(DMax("Mid(ProjectQNo,2,4)", "tbl_Projects", _
"Right(ProjectQNo,2)='" & Format(Date, "yy") & "'"), "0")) +
1, _
"0000") & Format(Date, "yy")
End If
End Sub
it actual looked at the Highest number in the ProjectQNo Field with in
the tbl_Projects and then worked out the next number to issue eg
Q374008 .
I Need a Similar code that would produce a number e.g C3750 but for it
not to reset the beginning of the year. can this me done?