R
rocketD
Hello,
I have a database of participants in a research study, and we have a
numbering convention to make sure each person gets a unique identifier
that tells us some information. The numbers are like this:
39901001, where "3" indicates the study, "9901" indicates yymm
participant was added to the database, and "001" is the consecutive
number of the participant to be added for that particular yymm. For
example, if a person was the third to be added in Feb. 99, it would be
39902003.
What I want to do is avoid mistakes by having users with limited
Access capability use a form where the ID auto-generates. I can
figure out how to get the information for the first 5 numbers entered,
but not the consecutive numbering by yymm. Here's what I have
specified in the field now:
=3 & Format(Now(),"yy") & Format(Now(),"mm") which gives 30911, and
that's great....but now I need the three digit consecutive number
(which means it has to have leading zeros if under 100). Ostensibly,
I want to get a count of the folks already entered for the current
month and year, then add 1. That way, it would keep increasing
incrementally with every new record. I tried a query but can't get it
to work.
Any ideas for the next step, or a better way?
Thanks,
Dara
I have a database of participants in a research study, and we have a
numbering convention to make sure each person gets a unique identifier
that tells us some information. The numbers are like this:
39901001, where "3" indicates the study, "9901" indicates yymm
participant was added to the database, and "001" is the consecutive
number of the participant to be added for that particular yymm. For
example, if a person was the third to be added in Feb. 99, it would be
39902003.
What I want to do is avoid mistakes by having users with limited
Access capability use a form where the ID auto-generates. I can
figure out how to get the information for the first 5 numbers entered,
but not the consecutive numbering by yymm. Here's what I have
specified in the field now:
=3 & Format(Now(),"yy") & Format(Now(),"mm") which gives 30911, and
that's great....but now I need the three digit consecutive number
(which means it has to have leading zeros if under 100). Ostensibly,
I want to get a count of the folks already entered for the current
month and year, then add 1. That way, it would keep increasing
incrementally with every new record. I tried a query but can't get it
to work.
Any ideas for the next step, or a better way?
Thanks,
Dara