Hi all,
I've been struggling with this problem for a few days now...I'm not that experienced at Access, so hopefully I'll be able to explain it properly for everybody.
A while ago I was tasked with creating a compliance testing database for my company's internal processes. For example: Payments, Hiring, Project Management, etc. Right now it's all done through Excel and is structured like this:
Compliance Test 01:
-----|Sample1|Sample2|Sample3|etc...
Item1|GradeA |GradeB |GradeC |etc...
Item2|GradeB |GradeA |GradeC |etc...
Item3|GradeC |GradeC |GradeA |etc...
etc...
In short, a Test has many Items (based on company regulations, like "Has the project been approved by all superiors?"). For each Item you choose a few Samples ("Project A", "Project B" and so on), and for each Sample the user attributes a Grade ("In Compliance", "Not In Compliance", "N/A", etc).
I've uploaded a barebones version of the DB so you guys can see what I mean.
In the Tests mainform, the user fills in the Test details (Tab #1), chooses which available Items he wants to include in his test (Tab #2), details the Samples which will be tested (Tab #3) and finally assigns a Grade to each Item/Sample combination (Tab #4).
Here's what I can't figure out (please let me know if I should create a separate topic for each question):
1) In the subform sfrm_Items_CTs_List (Tab #2): Is there I way I could assign multiple Item IDs to the same Compliance Test, using the listboxes provided? I wanted the user to assign multiple items at once, leaving out maybe one or two that aren't applicable to a specific Test. Assigning the Items one by one would be too cumbersome.
2) Most importantly, in the subform sfrmSamples_CT (Tabs #3 and #4): In the first two examples I filled everything in "under the hood", but in reality I haven't the foggiest idea of how to automatically assign the Item-Test / Item-Sample / Sample-Grade combinations to each other, in order to have it recognize these relationships. This is pretty much the heart of the database.
Taking a look at the way the Relationships are set up, I think that maybe one way to do it, would be for the DB to automatically check every time a user inputs a new Sample in Tab#3, to see if [tbl_Samples].[lngCT_ID] matches the [CT_ID] of any Items in the [tbl_LINK_Tests_Items]. If so, it'd fill in the matching Item/Sample ID combo in the [tbl_LINK_Items_Samples] table. Would this be correct? If so, how could I set this up in script form?
As always I appreciate any help, sorry for the huge post but I wanted to make sure I explained everything correctly. Please let me know if I can clarify anything for you guys.
Edit: I went ahead and attached a 2003 version of the database as the first upload used Access 2010.