Dirk.VanGiel
New member
- Local time
- Today, 04:14
- Joined
- Sep 30, 2013
- Messages
- 4
I have a data entry form to add new records to an Access database file called Claims. An auto-incrementing sequence number (SeqNbr) needs to be kept PER YEAR. If the user enters a date the sequence number pertaining to the year of this date needs to be incremented. The first record within a new year of course takes value 1.
Records can be added at random for different years.
A simple SQL-statement can be made to determine the new sequence number:
SELECT max(Claims.SeqNbr) + 1 from Claims where year(this.value) = year(Claims.EventDate)
this.value meaning the value of the date control in which the user entered the date.
I need to return the new sequence number to another field on the form in which also the COMPANY CODE, YYYY and MM from the EventDate, the new sequence number and the USER INITIALS are concatenated.
Being new to this forum I would appreciate every help to point me in the good direction.
Records can be added at random for different years.
A simple SQL-statement can be made to determine the new sequence number:
SELECT max(Claims.SeqNbr) + 1 from Claims where year(this.value) = year(Claims.EventDate)
this.value meaning the value of the date control in which the user entered the date.
I need to return the new sequence number to another field on the form in which also the COMPANY CODE, YYYY and MM from the EventDate, the new sequence number and the USER INITIALS are concatenated.
Being new to this forum I would appreciate every help to point me in the good direction.