I've setup my database to allow data entry for results of microbiological tests. We run 3 different types of tests depending on what is being tested, but all three tests are sent back to us in a similar format. The main difference is that a few test names are different.
In this example, I've used generic names for the tests at my companies request, so "test1" may actually be something like "salt content". The important thing is that the Result1-9 all have different names so it seemed wise to keep them on seperate tables. Results 1-3 will always correspond to test1 and results 4-6 will always correspond with test2 etc. My tables look like this:
tblReport
- Invoice number (PK)
- dateoftest
- timeoftest
- dateofsample
- timeofsample
tbltest1
- test1ID (autonumber PK)
- test1Invoice (FK)
- test1Swablocation
- test1result1
- test1result2
- test1result3
tbltest2
- test2ID (autonumber PK)
- test2Invoice (FK)
- test2Swablocation
- test2result4
- test2result5
- test2result6
tbltest3
- test3ID (autonumber PK)
- test3Invoice (FK)
- test3Swablocation
- test3result7
- test3result8
- test3result9
I've setup forms and subforms for each test so my forms look like this:
frmtest1
subfrmtest1results
frmtest2
subfrmtest2results
frmtest3
subfrmtest3results
What i need to do is make it so that when I open frmtest1, it doesnt show records that were entered under frmtest2 or frmtest3. Currently the records for all 3 forms show up under each form. is there a way to filter them out?
Additionally if I've gone about this a terribly complicated way, I'm open to hearing other suggestions for how to set this up. Thank you for your help
Bruce
In this example, I've used generic names for the tests at my companies request, so "test1" may actually be something like "salt content". The important thing is that the Result1-9 all have different names so it seemed wise to keep them on seperate tables. Results 1-3 will always correspond to test1 and results 4-6 will always correspond with test2 etc. My tables look like this:
tblReport
- Invoice number (PK)
- dateoftest
- timeoftest
- dateofsample
- timeofsample
tbltest1
- test1ID (autonumber PK)
- test1Invoice (FK)
- test1Swablocation
- test1result1
- test1result2
- test1result3
tbltest2
- test2ID (autonumber PK)
- test2Invoice (FK)
- test2Swablocation
- test2result4
- test2result5
- test2result6
tbltest3
- test3ID (autonumber PK)
- test3Invoice (FK)
- test3Swablocation
- test3result7
- test3result8
- test3result9
I've setup forms and subforms for each test so my forms look like this:
frmtest1
subfrmtest1results
frmtest2
subfrmtest2results
frmtest3
subfrmtest3results
What i need to do is make it so that when I open frmtest1, it doesnt show records that were entered under frmtest2 or frmtest3. Currently the records for all 3 forms show up under each form. is there a way to filter them out?
Additionally if I've gone about this a terribly complicated way, I'm open to hearing other suggestions for how to set this up. Thank you for your help
Bruce