My Access mentor has moved on and I'm learning that database design is always best if bounced around between minds. Particularly, when you're not actually a programmer!
My main data consists of - a list of projects, a list of yes/no questions that are to be answered for each project, a set of rules for each question. The questions are grouped by an environmental element (eg, 5 relate to air issues; 2 to water issues, etc) I have two (main) tables -
* tblIssues - the list of questions and a variety of fields that state what the rules are if the answer is yes. For example - question 1, if answered yes, might have a 'red' risk level, might need a particular permit. Question 2, might only be an 'orange' risk level, may not need any permits, but might need a particular action to be noted as required in the contract.
* tblProjects - the list of projects (and their various details)
I then created a third table (tblPrjIssues) that has a record for every question for every project (eg if there were 10 questions and 10 projects I'd have 100 records) (I have closer to 40 questions and potentially an infinite number of projects).
I'm beginning to think that this is not the best way to go about it. My issues are:
every time a project is added, I need a mechanism to create the question records in tblPrjIssues.
I can't work out how to design a form that is filtered on the project, and then groups the questions by their element (ie there is a heading "Water", and then all the water questions, before moving to a new 'page' with the heading "Air".)
I did design a form which used "if 'yes', dlookup the rules'; looks great - as soon as yes is ticked the fields all turn the risk level, the permits, surveys, searches, contract conditions, all come through beautifully. I was going to use the same premise to design a report. But then the issue of the fundamental table design occured to me, and I'm not so sure.
I'm using Access 2007, if that makes any difference.
My main data consists of - a list of projects, a list of yes/no questions that are to be answered for each project, a set of rules for each question. The questions are grouped by an environmental element (eg, 5 relate to air issues; 2 to water issues, etc) I have two (main) tables -
* tblIssues - the list of questions and a variety of fields that state what the rules are if the answer is yes. For example - question 1, if answered yes, might have a 'red' risk level, might need a particular permit. Question 2, might only be an 'orange' risk level, may not need any permits, but might need a particular action to be noted as required in the contract.
* tblProjects - the list of projects (and their various details)
I then created a third table (tblPrjIssues) that has a record for every question for every project (eg if there were 10 questions and 10 projects I'd have 100 records) (I have closer to 40 questions and potentially an infinite number of projects).
I'm beginning to think that this is not the best way to go about it. My issues are:
every time a project is added, I need a mechanism to create the question records in tblPrjIssues.
I can't work out how to design a form that is filtered on the project, and then groups the questions by their element (ie there is a heading "Water", and then all the water questions, before moving to a new 'page' with the heading "Air".)
I did design a form which used "if 'yes', dlookup the rules'; looks great - as soon as yes is ticked the fields all turn the risk level, the permits, surveys, searches, contract conditions, all come through beautifully. I was going to use the same premise to design a report. But then the issue of the fundamental table design occured to me, and I'm not so sure.
I'm using Access 2007, if that makes any difference.
Last edited: