Increment custom autonumber in batches

  • Thread starter Thread starter Crag
  • Start date Start date
C

Crag

Apologies for posting this again, but I was hoping someone who didn't read
this last time could shed some light on this for me.

For various reasons I have a custom autonumber control who's default value
is set to '=IIf(DMax("ConsecNo","tblConsec")<1,1,DMax
("ConsecNo","tblConsec")+1)' which works fine. I now need to set another
autonumber (Certificate) that only increments per batch of records i.e. in
tblConsec I have four records for company 'MyCompany' allocated to 2001,
2002, 2003, 2004. These records are allocated consecutive number 1-4
respectively. What I need is for the certificate autonumber to remain the
same for these four records and only increase by one when a new company is
selected.

Thanks once again,
 
Your Dmax() method is really only good in a single user enviroment. But, to
answer your question, I would use a table to store the certificate values,
along with the Company name. This could be used for many things in the
future. When you need the value retrieve it from the table, or link it in a
query, etc.
 
Back
Top