D
DS
I have this two part statement that gets the highest record then adds to
it. The problem is if a number is just a number and no letter exsists
it doesn't add a letter...such as 2 ends up as 2, not 2A....
but it does work if I have 2A, it does make it 2B. Also do these have
to be in seperate statements? Can't they be one, if so then how.
Thanks
DS
'DMAX
Me.TxtLast = DMax("[NumberID]", "tblTest", "Left(NumberID,Len(" &
Me.TxtCurrent & ")) = '" & Me.TxtCurrent & "'")
'ADD
Me.TxtNew = Left(Me.TxtLast, Len(Me.TxtLast) - 1) &
Chr(Asc(right(Me.TxtLast, 1)) + 1)
it. The problem is if a number is just a number and no letter exsists
it doesn't add a letter...such as 2 ends up as 2, not 2A....
but it does work if I have 2A, it does make it 2B. Also do these have
to be in seperate statements? Can't they be one, if so then how.
Thanks
DS
'DMAX
Me.TxtLast = DMax("[NumberID]", "tblTest", "Left(NumberID,Len(" &
Me.TxtCurrent & ")) = '" & Me.TxtCurrent & "'")
'ADD
Me.TxtNew = Left(Me.TxtLast, Len(Me.TxtLast) - 1) &
Chr(Asc(right(Me.TxtLast, 1)) + 1)