I am trying to add leading zeroes to a number in a work order. The incrementing part works fine. When i try to add the leading zeroes, it doesn't work. I am assuming that because it is a number it is stripping the leading zeroes.
WONumber = Right(DMax("fldwo", "tblAvionicsMainWO"), Len(DMax("fldwo", _
"tblAvionicsMainWO")) - InStr(1, DMax("fldwo", "tblAvionicsMainWO"), "-")) + 1
WONumber = Format(WONumber, "0000")
The last line is the one i can't get to work.
Any help is appreciated.
Thanks in advance
WONumber = Right(DMax("fldwo", "tblAvionicsMainWO"), Len(DMax("fldwo", _
"tblAvionicsMainWO")) - InStr(1, DMax("fldwo", "tblAvionicsMainWO"), "-")) + 1
WONumber = Format(WONumber, "0000")
The last line is the one i can't get to work.
Any help is appreciated.
Thanks in advance