If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
SELECT DISTINCTROW help
Good Morning,
I am working on a Questionnaire Database. I'm currently trying to link questions to specific subforms is this possible? If so, would someone please help me with the code? If I was using the code below is there a way I could choose specific questions like 1-30? Or would I need to create a table for each set of questions? SELECT DISTINCTROW tblQuestions.* FROM tblQuestions ORDER BY tblQuestions.QuestionID, tblQuestions.QstnLvl; Thanks for the help ~Tammy |
#2
|
|||
|
|||
SELECT DISTINCTROW help
Tammy -
Yes, you can select record ranges: SELECT DISTINCTROW tblQuestions.* FROM tblQuestions WHERE tblQuestions.QuestionID between 1 and 30 ORDER BY tblQuestions.QuestionID, tblQuestions.QstnLvl; -- Daryl S "MsWatts" wrote: Good Morning, I am working on a Questionnaire Database. I'm currently trying to link questions to specific subforms is this possible? If so, would someone please help me with the code? If I was using the code below is there a way I could choose specific questions like 1-30? Or would I need to create a table for each set of questions? SELECT DISTINCTROW tblQuestions.* FROM tblQuestions ORDER BY tblQuestions.QuestionID, tblQuestions.QstnLvl; Thanks for the help ~Tammy |
#3
|
|||
|
|||
SELECT DISTINCTROW help
On Tue, 20 Apr 2010 08:55:02 -0700, MsWatts
wrote: Good Morning, I am working on a Questionnaire Database. I'm currently trying to link questions to specific subforms is this possible? If so, would someone please help me with the code? WHOA!!!!! A separate *SUBFORM* for each question? That's really not generally a good idea. A subform is a display tool; if you have variable data for each question you would normally have one or more controls (textboxes, etc.) on a single subform with varying contents, not a different form for each question. If I was using the code below is there a way I could choose specific questions like 1-30? Or would I need to create a table for each set of questions? SELECT DISTINCTROW tblQuestions.* FROM tblQuestions ORDER BY tblQuestions.QuestionID, tblQuestions.QstnLvl; Sure. Just put a criterion specifying which question or questions you want to see. You may want to look at Duane Hookom's excellent "At Your Survey" sample at http://www.rogersaccesslibrary.com/Otherdownload.asp?SampleName='At%20Your%20Survey%2 02000' or at Roger Carlson's Training Registration database: http://www.rogersaccesslibrary.com/d...gistration.mdb -- John W. Vinson [MVP] |
#4
|
|||
|
|||
SELECT DISTINCTROW help
I think that's why the QstnLvl is there. You could set a value in the main
form for the QstnLvl and use the Link Master/Child properties to display questions based on the level. If you can't use this field, you might need to add another method for grouping similar questions. -- Duane Hookom Microsoft Access MVP "MsWatts" wrote: Good Morning, I am working on a Questionnaire Database. I'm currently trying to link questions to specific subforms is this possible? If so, would someone please help me with the code? If I was using the code below is there a way I could choose specific questions like 1-30? Or would I need to create a table for each set of questions? SELECT DISTINCTROW tblQuestions.* FROM tblQuestions ORDER BY tblQuestions.QuestionID, tblQuestions.QstnLvl; Thanks for the help ~Tammy |
Thread Tools | |
Display Modes | |
|
|