Hi
I have a field that starts with a letter C or T and then following 4 digits. I want a way that can increment the number by 1 when a record is added. The number starts with 3842 suppose the user wants to add a T product then the next number should be T3843 and after this if the user wants to add a C product then the next number should be C3844 this numbers are generated when the user clicks a add new button one for C Product and the other for T Product. I have set this fields as text and so far I have the following code..
Dim MyVal1 As String
MyVal1 = DMax("[Tracking#]", "Bulletins"
Forms!All!txtTracking = "T" & Right(MyVal1, 4) + 1
Do I need a different table to do all the incrementing..
But this seems not to work is there any other way to do this..
Please help.
I have a field that starts with a letter C or T and then following 4 digits. I want a way that can increment the number by 1 when a record is added. The number starts with 3842 suppose the user wants to add a T product then the next number should be T3843 and after this if the user wants to add a C product then the next number should be C3844 this numbers are generated when the user clicks a add new button one for C Product and the other for T Product. I have set this fields as text and so far I have the following code..
Dim MyVal1 As String
MyVal1 = DMax("[Tracking#]", "Bulletins"
Forms!All!txtTracking = "T" & Right(MyVal1, 4) + 1
Do I need a different table to do all the incrementing..
But this seems not to work is there any other way to do this..
Please help.