Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Access Query

Posted 10 May 2006 19:54:41
1
has voted
10 May 2006 19:54:41 John Schmidt posted:
Hello all,

I have what is probably an easy question, but I am not a programmer. I am a researcher in behavioral medicine, and have been using Dreamweaver to put up surveys targeted at different medical populations. It has been a great tool, and I have learned much in the development and application of our surveys.

My problem is this: A colleague of mine is putting together a websurvey to standardize a measure of optimism. She wants to provide a score to the user so the user can read a small synopsis or description of where they are on the optimism-pessimism band.

I have the ASP pages working, the Access DB set up, and can enter data fine. I also made a query in Access to score the survey. My problem is that I do not know how to have the DB query run when the form is submitted, and then have the score appear on the next HTML page. Well, I do know how to have the 'score' field appear on the HTML page, I just don't know how to get the query to run.

I am using 2004MX and MS Access.

Any help would be greatly appreciated!
Thanks-

Replies

Replied 15 May 2006 02:56:38
15 May 2006 02:56:38 Javier Castro replied:
this is the way it should work.

1. Survey page: you have your survey form that is submitted to the db. using the submit button.
Select the form and in Action put the url where you want to display the score.Let's call that page "score.asp"

2.- on "score.asp" you put your query that will call the score.
i.e. rsScore
SELECT * FROM tblScore
ORDER BY scoreID ASC
the using DWMX dynamic table you can show all your results.

hope it helps.

Replied 16 May 2006 05:47:30
16 May 2006 05:47:30 John Schmidt replied:
Hi Javier and thank you for the reply.

What I want to do is have some code sum the answers each person gives (ten questions with answers 1 to 5) to give me a total score for each person (possible range of 10 to 50). I then want to have that score entered in a field in the same table (lotadata). I already have a score.asp page and can load whatever is in the 'score' field onto the page using a recordset query.

I was wondering if it would be possible to do this within the dreamweaver code and just keep the score variable (sum of all the answers) as a hidden field and then pass it to the next page when the submit button is clicked. Once the page is loaded, I can show the hidden field in a dynamic text box. My problem is getting the sum of scores.

Thanks again, and I hope I have explained this clearly.

Here is a link to a study I have on-line for trauma survivors. You can click through without entering any data to see how I lay out a typical survey. This one is very long due to the subject matter and focus of the study.

www.psyresearchonline.com/ptgstudy/irb.html

For the problem I have now, it is just a one-page survey with the next page providing score for the questionnaire.

Replied 17 May 2006 16:59:18
17 May 2006 16:59:18 Javier Castro replied:
Yes, I am sure you can do it within DWMX, but you need to write the proper query. I would suggest you to post your question to the SQL forum, they can help you to do Query that would allow you to achieve what you want.
www.dmxzone.com/forum/forum.asp?forum_id=13

Good luck.

Reply to this topic