We help IT Professionals succeed at work.
Get Started
Troubleshooting Question

Ad sequence number to new record in MS Access

Nicola Siotto
on
111 Views
Last Modified: 2021-03-06
I have several forms but these are all linked to the same table and create or elaborate records on the same table.

Here's what the form looks like:


The CPR control right now is automatically created in the properties as automatic value and consists of a fixt value which remains indefinitely the same PC.CPR. + a variable value which is the year. On the first of January of each year the year of course will update and the numbers will re-start from 0001 in four digits. So from that one any new record will add a number, i.e. PC.CPR.2021.0002, PC.CPR.2021.0003 PC.CPR.2021.0004 and so on.

When the form is opened of I wish to number the CPR # control automatically considering the last record and numbering automatically subsequently and also when i click on the NEXT record on the bottom of the form to do the same.

Is it possible. And if yes, how?

For reference purposes:
The form is called: _CPR_NEW
The table is called: main
Record is called: CPR
Comment
Watch Question
Owner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010
Commented:
This problem has been solved!
Unlock 1 Answer and 66 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE