I need help in creating an autonumber like field.
Program_Name and Prg_Rec_No are composite primary keys.
Originally Prg_Rec_No was an autonumber field type and this was OK when the database was used for only one Program. Now it is to be used for multiple programs.
How can I auto-increment the Prg_Rec_No field for each new or additional Program_Name? See sample below.
Program_Name Prg_Rec_No
Program A 1
Program A 2
Program B 1
Program C 1
Program C 2
Program C 3
What I hope to do is this. Upon entering data for a new Program_Name, say "Program D", I would like Access to recognize there are no pre-existing records of "Program D" and automatically create a new Prg_Rec_No to be "1".
Also, I need Access to recognize upon entering a new record for Program B that the last known record # (Prg_Rec_No) is 1 thus assigning the "new" record Prg_Rec_No # to be "2" (for Program B) and so on.
Program_Name and Prg_Rec_No are composite primary keys.
Originally Prg_Rec_No was an autonumber field type and this was OK when the database was used for only one Program. Now it is to be used for multiple programs.
How can I auto-increment the Prg_Rec_No field for each new or additional Program_Name? See sample below.
Program_Name Prg_Rec_No
Program A 1
Program A 2
Program B 1
Program C 1
Program C 2
Program C 3
What I hope to do is this. Upon entering data for a new Program_Name, say "Program D", I would like Access to recognize there are no pre-existing records of "Program D" and automatically create a new Prg_Rec_No to be "1".
Also, I need Access to recognize upon entering a new record for Program B that the last known record # (Prg_Rec_No) is 1 thus assigning the "new" record Prg_Rec_No # to be "2" (for Program B) and so on.