control source/record source, subform trouble

Mrs.Meeker

Registered User.
Local time
Today, 20:13
Joined
Mar 28, 2003
Messages
172
I've tried and tried and can't get this straight in my head. I have 3 tables; tbl_questions, tbl_surveys, tbl_results. I have a nice form with a continuous subform. The form has 5 subjects from tbl_surveys, the subform contains all the questions from tbl_questions and also option buttons for yes, no, n/a. I have the subforms' record source set to tbl_questions. But I don't know what to do with the option buttons. I was told to set the control source to the table that would store the answer to the question in the option box. This would be tbl_results. How can I set the control source to something in tbl_results when the subforms record source is set to a different table?

I'm still very new at this, so please bear with me!

If you want to take a peak I have it attached.

Thanks,
Rhonda
 

Attachments

Mrs. Meeker:

Take a look at the attached example. I believe it will provide you some direction in how to apply the answers to your questions to the results table.
 

Attachments

Set the subforms record source to this:


SELECT Tbl_questions.pageCode, Tbl_questions.qtext, Tbl_questions.reference, Tbl_questions.Notes, tlb_results.Answer FROM Tbl_questions INNER JOIN tlb_results ON Tbl_questions.qID = tlb_results.qID;

Then you can set the controll source for you hidden text box "Answer" to Answer.

I hope this helps
 
coryt: At the risk of sounding like a complete idiot...I need a little more help.

How do I set the subforms record source to all of that? I tried clicking on the 3 little dots next to the drop down arrow for the record source thinking I was going to get the expression builder but instead got the SQL statement, Query Builder. I'm not sure where to start, or how to plug this all in.

Got a minute to explain?

Thanks,
Rhonda
 
Just copy it from my previous post, and paste it over the existing information in the record source. You could also use the query builder. Add the two tables to the query builder and then select the fields you wish to use. Just like making a reqular query.
 
coryt: I got it pasted in and the questions don't show up in the subform. I've been messing around with it and then got your last note. I downloaded yours and see the questions aren't showing up there either...???

Any ideas?
Thanks,
Rhonda
 
You never asked about the questions. I was responding to this:

I've tried and tried and can't get this straight in my head. I have 3 tables; tbl_questions, tbl_surveys, tbl_results. I have a nice form with a continuous subform. The form has 5 subjects from tbl_surveys, the subform contains all the questions from tbl_questions and also option buttons for yes, no, n/a. I have the subforms' record source set to tbl_questions. But I don't know what to do with the option buttons. I was told to set the control source to the table that would store the answer to the question in the option box. This would be tbl_results. How can I set the control source to something in tbl_results when the subforms record source is set to a different table?

I'm still very new at this, so please bear with me!

If you want to take a peak I have it attached.

Thanks,
Rhonda





I will play around with it more when I get a chance.
 
I'm sorry, the questions in were showing up in the subtable before, I just couldn't get the option buttons to work. Didn't mean to make you mad. Thanks for the help that you gave me.

Rhonda
 
I'm not mad, try selecting each of the forms controll sources again.
 
I'm still chasing my tail and beating my head against my desk. I try one thing and lose my continuous subform, and still my option buttons don't work properly, I get my continuous form back and the buttons still don't work. I've tried making a subform of just the option buttons and putting that in the subform of questions and lose my continuous form (and they still don't work anyway). I've tried different queries and can really screw things up. I've even had all the buttons blinking and well I think I'll go home and have a beer. Ah heck, I don't drink, so maybe I'll just stop at Dairy Queen for a big fattening Blizzard!

IF there is any hope left I'd be delighted to receive more advice.

Sincerely and gratefully,
Rhonda
 
Rhonda:

Have you looked at the example I posted?
 
Yes I have. I tried to follow that and lost my continuous subform. I would like to have all questions for the category to show together as it does in my sample.
 

Users who are viewing this thread

Back
Top Bottom