D
DKS
Hi,
PROBLEM DESCRIPTION
----------------------------
For legacy reasons, I have a system that used to create a "unique id" for
each added record as follows:
yyyy-nnn
where yyyy is the year of the record, and nnn is a serial number starting
from 001 and incremented by 1 for each new record.
Of course, this is not necessarily if we build an "autonumber" from Access.
But for legacy reasons this is done, and unfortunately many queries and other
functions are already using this feature and so difficult to replace this
"old" mechanism by a simple AUTONUMBER field.
MY REQUIREMENT
---------------------
This "unique id" is filled in manually on the form for record creation.
Thus the form has an inbuilt query that gives the last number used (nnn) for
the year in question, and the user must manually fill in the new yyyy-nnn
field.
I would like this filling up to be automatic, but so far I have not managed
to make it work. My need is that when the record is saved, this field must
be automatically calculated and filled in (it is saved in the table).
I have no problems to use a "parameters" style table that stores the last
used value for "nnn" to permit an easy lookup. But somehow I cannot get this
to work.
any ideas/suggestions?
Many thanks in anticipation.
PROBLEM DESCRIPTION
----------------------------
For legacy reasons, I have a system that used to create a "unique id" for
each added record as follows:
yyyy-nnn
where yyyy is the year of the record, and nnn is a serial number starting
from 001 and incremented by 1 for each new record.
Of course, this is not necessarily if we build an "autonumber" from Access.
But for legacy reasons this is done, and unfortunately many queries and other
functions are already using this feature and so difficult to replace this
"old" mechanism by a simple AUTONUMBER field.
MY REQUIREMENT
---------------------
This "unique id" is filled in manually on the form for record creation.
Thus the form has an inbuilt query that gives the last number used (nnn) for
the year in question, and the user must manually fill in the new yyyy-nnn
field.
I would like this filling up to be automatic, but so far I have not managed
to make it work. My need is that when the record is saved, this field must
be automatically calculated and filled in (it is saved in the table).
I have no problems to use a "parameters" style table that stores the last
used value for "nnn" to permit an easy lookup. But somehow I cannot get this
to work.
any ideas/suggestions?
Many thanks in anticipation.