Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if then the way to go

Status
Not open for further replies.

goslincm

MIS
May 23, 2006
292
US
Earlier I posted in the queries forum, and it was suggested that what I'm trying to accomplish might be best done through Word. I just want to see if anyone can see another way.

I have a form, which is like a survey with several questions (labels) and a corresponding yes/no field for answering.

After the user complete this "survey" I need to somehow take all the NO answers and print out the labels (or a similar statement). So my document being produced would look like:

Dear [name]

You are not qualified due to the following reasons:

-text here giving blurb for question with no
-text here also for any additional questions w/no

Can I do this somehow using VB?
 
It will be easier if you create a table for the Survey, and a separate one for Survey questions/answers:

[tt]table survey
surveyID
surveyName

table surveyQuestion
questionID
surveyID
userID
question
answer[/tt]

Using this 'normalised' approach, you can then simply query the surveyQuestion table, 'WHERE answer=No'

Max Hugen
Australia
 
Thanks, couple questions though:

Is the purpose of a seperate table survey more for down the road if other survey's are needed?

Also, your telling me I can take the existing table with its information and feed it into this new table? Would that be by running an update query?
 
Is the purpose of a seperate table survey more for down the
road if other survey's are needed?

More or less. But any time you have to make a table change later it means you have to change a bunch of queries and logic based on it and it is not always practical.


Also, your telling me I can take the existing table with its information and feed it into this new table? Would that be by running an update query?

An Append query adds records, an update query modifies records. You may also be interested in a Make Table query... it makes a table based on the data in it. This is usually faster than making a table manually and then appending data. Although it does not copy indexes so you still have to go back and enter those.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top