I have one table (SafetyEvents) where users will register the amount of safety events per day. For each event, a reportnumber must be created that looks something like XXX-XXXXX-001.
In my table SafetyIACT (a particular event), to register the reportnumbers I have the following fields:
ReportID - autonumber
DPRDate - Date/time
Projectnumber - text
reportnumber (PK) - text
description - text
I want each new reportnumber to have some info (about the project XXX-XXXXX) and an automated number in the form of 3 digits, so 001 to 999 (I will never have more than 100 reports in a certain project, but just to be sure). This number depends on the projectnumber. So each time a new projectnumber is added, it should start counting from 001 and increase by 1 for each added reportnumber in that project.
I would like to put the necessary code in the "got focus" event of the "reportnumber" field so it fills in automatically, but can be changed when needed.
I would also like to count the number of reportnumbers on a certain DPRDate and have just this number to fill in the SafetyEvents form (which tells me the number of reports per day.
Any thoughts?
Thank you very much in advance!
Mark
In my table SafetyIACT (a particular event), to register the reportnumbers I have the following fields:
ReportID - autonumber
DPRDate - Date/time
Projectnumber - text
reportnumber (PK) - text
description - text
I want each new reportnumber to have some info (about the project XXX-XXXXX) and an automated number in the form of 3 digits, so 001 to 999 (I will never have more than 100 reports in a certain project, but just to be sure). This number depends on the projectnumber. So each time a new projectnumber is added, it should start counting from 001 and increase by 1 for each added reportnumber in that project.
I would like to put the necessary code in the "got focus" event of the "reportnumber" field so it fills in automatically, but can be changed when needed.
I would also like to count the number of reportnumbers on a certain DPRDate and have just this number to fill in the SafetyEvents form (which tells me the number of reports per day.
Any thoughts?
Thank you very much in advance!
Mark