Years ago, I created a data base in MS Excel to keep track of my photographs. The way I designed it was as follows. I had a master sheet that had a primary key with a sequenctial number ID for every photo. Then I had several sheets in the workbook that contained specific photos of the same subject, e.g. landscapes (LS), seascapes (SC), sunsets (SS) etc. Each of these sheets had a primary key as well that sequenced the photo ID in that subject. I programmed a form to open when I needed to enter in a new photo. When the form opened it would determine the last record in the master sheet and increment the primary key to the next number in the sequence. Then I would pick what sheet (phto type - LS, SC, SS etc) and it would determine the last record number on that particular sheet in increment to the next number and enter that into the form as well. Then I could enter in the specifics about that photo like exposure settings, location, date taken, key words, etc. It would then write all this information in both the master sheet and the specific subject sheet. Not the most elegant, but it worked for me.
I want to duplicate this in MS Access but I am having trouble in figuring out how to increment on both the master photo number and the subject photo number at the same time when I open the master form.
In MS Access I created a master table with all the fields that existed in the Master sheet in the Excel workbook. The only difference between the master and subject sheets is that the master has two additional columns, one for the Primary key (the master photo number) and one for the subject of the particular photo. The next column contains the specific subject photo number. So for example, two sequential records in the master sheet might be as follows slideID = 1245 subject = LS subjectID = 245, then slideID = 1246 subject = SS subjectID = 127. In the subject sheets subjectID is the only unique identifer. All other pertinent information about the photo is duplicated in both the master and subject sheets.
So in MS Access, I have this one Master table. I have a form that I use to enter in the photo information. How can I get it to increment both the Master photo ID number, currently the Primary key of the table and also to increment the subject ID number once I choose what the subject is from the form?
I hope this is clear.