I have used and maintained Access databases in the past but this is my first experience with building a new database. I started by borrowing every Access book my Tech department has on hand and going through them. I have gotten to the point where my tech department can not help me because my question is beyond their own knowledge. I have searched through many different website’s forums and have failed to find what I am looking for. It very well may be out there and I am using the wrong terminology in my searches. The most important piece of information to be stored in my entire database is of course the one that I am having the hardest time figuring out how to set up.
I have a table called “Document Index” which will be a master log of every document that passes through my department. This table has the three fields which are important to my problem/question.
1. The “LOC” field represents the location at which the document was logged. The “LOC” field has a working validation rule that only allows a “D” or “S”, representing the department head’s office or the site office.
2. The “DUO” field value represents the three digit unique number assigned to a project by another department (accounting)
3. The “ID Number” field is a unique number we will assign to each document that is this table’s primary key. It is also where my problem sits. The “ID Number” format has been decided upon by my boss and the rest of the office has already begun stamping these ID Numbers onto every document (which I will have to go through and enter once the database is complete). I am stuck with the format as it is shown in the example below.
“ID Number” format is: value of “LOC”- value of “DUO”-number
I know what I want the field to do but I have no idea how to turn my ideas into the proper code to see if it works. So here is my idea of a solution with example values entered.
A. Fill in form for “LOC” and “DUO”
B. At this point Access would run a behind the scenes search and return all ID #’s that had a that “LOC and “DUO”
C. At this point Access would run a behind the scenes search through only those records found in step B to find the highest “ID Number” previously assigned
D. At this point Access would make a calculation: adding one (+1) to the “ID Number” found in step C
E. At this point Access would insert the result found in step D into the “ID Number” field of my current entry (which until this step the record only contained the “LOC” and “DUO”)
For example: if my first 4 entries had this info:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
S 410 S-410-1 Priate's Demands
D 415 D-415-1 Cinderella’s Birthday Invitation
D 410 D-410-2 Peter Pan’s Response to Ransom Note
Then I complete step A by typing into the form:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
S 410 S-410-1 Priate's Demands
D 415 D-415-1 Cinderella’s Birthday Invitation
D 410 D-410-2 Peter's Response to Ransom Note
D 410
Access would execute step B finding:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
D 410 D-410-2 Peter's Response to Ransom Note
Access would execute step C finding:
LOC DUO ID Number Document Description
D 410 D-410-2 Peter's Response to Ransom Note
Access would execute step D finding:
D-410-2 + 1 = D-410-3
Access would execute step E:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
S 410 S-410-1 Priate's Demands
D 415 D-415-1 Cinderella’s Birthday Invitation
D 410 D-410-2 Peter's Response to Ransom Note
D 410 D-410-3
Then I would finish entering the information for that record.
I would appreciate any help you can offer, even if just pointing me in the right direction or correct terminology for my searches.
I have a table called “Document Index” which will be a master log of every document that passes through my department. This table has the three fields which are important to my problem/question.
1. The “LOC” field represents the location at which the document was logged. The “LOC” field has a working validation rule that only allows a “D” or “S”, representing the department head’s office or the site office.
2. The “DUO” field value represents the three digit unique number assigned to a project by another department (accounting)
3. The “ID Number” field is a unique number we will assign to each document that is this table’s primary key. It is also where my problem sits. The “ID Number” format has been decided upon by my boss and the rest of the office has already begun stamping these ID Numbers onto every document (which I will have to go through and enter once the database is complete). I am stuck with the format as it is shown in the example below.
“ID Number” format is: value of “LOC”- value of “DUO”-number
I know what I want the field to do but I have no idea how to turn my ideas into the proper code to see if it works. So here is my idea of a solution with example values entered.
A. Fill in form for “LOC” and “DUO”
B. At this point Access would run a behind the scenes search and return all ID #’s that had a that “LOC and “DUO”
C. At this point Access would run a behind the scenes search through only those records found in step B to find the highest “ID Number” previously assigned
D. At this point Access would make a calculation: adding one (+1) to the “ID Number” found in step C
E. At this point Access would insert the result found in step D into the “ID Number” field of my current entry (which until this step the record only contained the “LOC” and “DUO”)
For example: if my first 4 entries had this info:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
S 410 S-410-1 Priate's Demands
D 415 D-415-1 Cinderella’s Birthday Invitation
D 410 D-410-2 Peter Pan’s Response to Ransom Note
Then I complete step A by typing into the form:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
S 410 S-410-1 Priate's Demands
D 415 D-415-1 Cinderella’s Birthday Invitation
D 410 D-410-2 Peter's Response to Ransom Note
D 410
Access would execute step B finding:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
D 410 D-410-2 Peter's Response to Ransom Note
Access would execute step C finding:
LOC DUO ID Number Document Description
D 410 D-410-2 Peter's Response to Ransom Note
Access would execute step D finding:
D-410-2 + 1 = D-410-3
Access would execute step E:
LOC DUO ID Number Document Description
D 410 D-410-1 Wendy’s Ransom Note
S 410 S-410-1 Priate's Demands
D 415 D-415-1 Cinderella’s Birthday Invitation
D 410 D-410-2 Peter's Response to Ransom Note
D 410 D-410-3
Then I would finish entering the information for that record.
I would appreciate any help you can offer, even if just pointing me in the right direction or correct terminology for my searches.