D
Dan
Hi,
I Have a little code written on aform load
Which basicly looks up ProjectQNo Column, then adds the next number along in that column new record at moment the table starts from E1685 and Finishes at E2504
For some unknown reason when i open the form it thinks the next number should be E2412 - but this has already been used.
the forms code is
If Me.NewRecord Then
Me!ProjectQNo = "E" & _
Format(CLng(Nz(DMax("Mid(ProjectQNo,2,4)", "tbl_Projects", _
"Right(ProjectQNo,2)='" & Format(Date, "yy") & "'"), "0")) + 1, _
"0000")
any body got any ideas? or is there a simpler code? i could use?
Thanks
Dam Cawthorne
I Have a little code written on aform load
Which basicly looks up ProjectQNo Column, then adds the next number along in that column new record at moment the table starts from E1685 and Finishes at E2504
For some unknown reason when i open the form it thinks the next number should be E2412 - but this has already been used.
the forms code is
If Me.NewRecord Then
Me!ProjectQNo = "E" & _
Format(CLng(Nz(DMax("Mid(ProjectQNo,2,4)", "tbl_Projects", _
"Right(ProjectQNo,2)='" & Format(Date, "yy") & "'"), "0")) + 1, _
"0000")
any body got any ideas? or is there a simpler code? i could use?
Thanks
Dam Cawthorne