Criteria problem

Mrs.Meeker

Registered User.
Local time
Today, 11:23
Joined
Mar 28, 2003
Messages
172
I have a query that sends answers from a survey to a table. This was written by someone who has been helping me to learn Access. For some reason that I am not aware of a "9" was placed in the criteria for Survey Number in tblQuestionResults. The answers in tblQuestionResults only hold answers for survey number "9". I have tried removing the "9" - not a good thing. I've tried >1 - also not a good thing. I'm attaching a screen print of the query.

This database has many problems but I'm plugging along one by one :)

Thanks! Rhonda
 

Attachments

  • qrysurveyqcsubform.gif
    qrysurveyqcsubform.gif
    11.1 KB · Views: 122
Hi Pat,

I removed the 9 but got unexpected results. When I opened the form from form view and entered a bunch of answers they all showed up in tlbQuestionResults in a "straight line" regardless of what the survey number was. See attachment.

Then I dicided to try and go through the main menu and when I got to the form all the questions were "1" about 40 times then "2" about 40 times, etc.

I also noticed that the buttons on the form never change...but that's another issue for another forum.
 

Attachments

  • tblquestionsresults.gif
    tblquestionsresults.gif
    12.1 KB · Views: 123
Mrs. Meeker,

The form was based on the query. When the query had the
"9" removed it let in all of the surveys. You will get all of
the question '1's, then '2's and so on.

What you can do is make a new unbound combo on your
form. Call it cboSearchSurvey and make its row source
"Select Distinct(SurveyNumber) From tblSurveys". Make its
default value "1" (or "9" if you prefer).

Use the AfterUpdate of this new combo to do a Me.Requery.

Then go back to the query, and where the "9" was put:

=Forms![YourMainform]![cboSearchSurvey]

This way when your form wakes up, you will get all surveys,
but when you do a selection in the new combo, you will
get just that survey.

Wayne
 
Hi, I'm not ignoring your post, I've been out of the office and will look into this soon. Thanks for the advise!
 

Users who are viewing this thread

Back
Top Bottom