A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SELECT DISTINCTROW help



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 04:55 PM posted to microsoft.public.access
MsWatts
external usenet poster
 
Posts: 24
Default 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  
Old April 20th, 2010, 05:07 PM posted to microsoft.public.access
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default 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  
Old April 20th, 2010, 06:08 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old April 20th, 2010, 09:09 PM posted to microsoft.public.access
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.