I am Having trouble using the Dmax function.
I want a field on my form to generate a new sequence number for a tracking number i have made.
The format of the tracking number is ##-AA-####-####, with the last four being the sequence number.
So far I have programmed the database to generate the bas tracking number (##-AA-####) in one field, and I want to generate the sequence number in another and then somehow combine them. In my database I have a column for the actual tracking number(including the sequence) and another just with the sequence. My Idea was to generate the new sequence number using the dmax function, but i was having issues using the criteria part of it. It needs to generate a sequence number 1 higher than the highest sequence number but per part and part number.
Ex: Tracking number could be 01-TC-7220-0001 or 01-TC-7240-0001
The 3 set of numbers in the tracking number is the last four digits of the part number. but two different part numbers can be the same type of part (01).
Any help would be appreciated! Thanks!