this looks like what im after can it be simplified.
Autonumber doesn't work this way. In your example, you get QUOT0001, QUOT0002, ORD0003, etc. if it is in the same table.
You have to do something different if you want a compound prime key with independent numbering for each sub-set of the key.
Let's consider a table like this:
tblMyTable
fldMyPKAlpha, text, first field of compound prime key, value can be defined by lookup if you wish, field either is not individually indexed or is indexed with Duplicates Allowed.
fldMyPKNumer, long, second field of compound prime key, value is defined in a way I'll show you in a moment. Field either is not individually indexed or is indexed with Duplicates Allowed.
of course, plus other fields as needed. The prime key is the compound of fldMyPKAlpha and fldMyPKNumer, and THAT (because it is a prime key) is indexed with NoDuplicates
OK, the way you assign the number is
1. Find the value for the Alpha part.
2. Run a 1+Nz( DMax( "fldMyPKNumer", "tblMyTable", "fldMyPKAlpha = """ & fldMyPKAlpha & """"), 0)
(or something like this, you might have to play with the quotes.)
In essence, this says "Tell me the next unused number that is 1 higher than the highest used number in the table for this particular Alpha key, and if the DMax can't find anything, give me number 1"
Note that this is NOT an autonumber, so it will not have gaps if you start to store something but abort the process. Autonumbers can leave gaps after aborting a number allocation. If you delete the highest number after an operation goes bad, you will RE-USE the number. If you delete lower numbers, you will have gaps.