MS Access- Age : Queries and Forms

Status
Not open for further replies.

DSFan1970

Member
Was wondering if I can get advice on a problem I am having:

I have a letter in Access as report. I have the report tied to two queries. The report when run pulls the name and address from one table and the question they answered wrong in the other.
-----------------
Dear So and So,

You failed because you answered the following question(s) wrong:

1) Is the sky blue.

Sorry,

John
--------

So when the report is run, the query populates the address and then the other query runs. In the other query I have a list of the questions (4 in total). So the data entry person just has to put the correct question the applicant answered wrong, in this case question 1.
This works.

So now, I need a report, where the data entry person can put that the applicant answered question 1 AND 2 AND 3 AND 4 or any combo thereof like this:

Dear So and So,

You failed because you answered the following question(s) wrong:

1) Is the sky blue.
2) Dr Pepper is a soda.
4) Christmas is in December.

Sorry,

John
--------

So I created a form with the questions and a table with the questions. How do I link it all? Any assistance will be greatly appreciated!
 
You would need a 3rd bridge table between Table A (User info) and Table B (List of questions) with at least 3 fields for example User ID, Question ID, and Y/N (Whether they answered correctly or not). The User ID & Question ID combo would be your composite key.
 
If I understand the problem domain:

+-----------+
+(Tester)---+
+*testerId--+
+*moreFields+
+-----------+

+--------------+
+-(Questions)--+
+*questionId---+
+*questionText-+
+*answer-------+
+---------------+

So you have two tables. One of testers and one of questions. You need to run a report on if how many answers tester#1 got right? You would probably need like an answers table such as:


+-------------------+
+-(Responses)------+
+*testerId----------+
+*questionId--------+
+*suppliedResponse-+
+-------------------+


You would then link the tables together via the PK of testerId/questionId to relate them to the two tables.
 
Your description of your data layouts is very vague as that is key to actually solving your issue. So im gonna have to go with above poster and just suggest you have a solid table joining the data together.
 
I don't think they need help with the table structure. They have what they need for something this simple. Sounds like the solution is in the access report designer which I'm not familiar with.
 
Thank you all. To be more clear.

I have a staff member that needs to send out letters to people who fail their test and are denied.

Table One has the test taker information:
Date they took the test, name and address.

Test Date
Application Number
Name
Address

Table Two:

1) Is the sky blue.
2) Dr Pepper is a soda.
3) Tomatoes are red.
4) Christmas is in December.

-----------

So my staff needs to send out a letter saying they failed because they failed to answer any or all of the four questions.

Now, the application info is pulled from the Table One when the report is run, then I have a query set up saying: ENTER QUESTION THEY ANSWERED WRONG and she puts 1,
and the letter comes out like this:
-----------------
Dear So and So,

You failed because you answered the following question(s) wrong:

1) Is the sky blue.

Sorry,

John
--------

So this letter going to the applicant is good for when they answered one question wrong. I need a denial letter with any or all of the four questions added to the letter.

The letter needs to tell them specifically why they failed, so I don't get them coming in later on. IE: You failed because you answered 1, 2, 3 and 4 wrong.
----------------
 
Sounds like your issue is coming down to a flaw in the design of the system. Solutions would be to either enable a report system that allows multiple entries of incorrect questions or somehow modify the first table to be more specific on what questions were incorrectly answered.

Maybe you just need to update your query to do a 'Select * from table where QUESTION in (LIST QUESTIONS INCORRECT HERE separated by commas)'

or something
 
Status
Not open for further replies.
Top Bottom