I am developing a database for inspection activities that are carried out by my department. Each inspection activity is given a unique reference number called "inspection Code". The Inspection Code is generated by combining a unique code assigned to each entity inspected (Entity Code), a unique code assigned to the purpose of the inspection (Purpose Code), a serial number that starts from 01 at the beginning of the year, the Month number and the year number. Example code is given as KCMI011122 (KC is entity code, MI is purpose code, 01 is the serial number, 11 is the month number and 22 is the year number). The code for each entity begins with 01 at the start of each year and reset to 01 at the end of the year.
I want to generate this code automatically.
I have been thinking about a way out for days but no luck. I will be happy if someone can help me out.
I have attached a sample database.
I want to generate this code automatically.
I have been thinking about a way out for days but no luck. I will be happy if someone can help me out.
I have attached a sample database.