VamPuke
11-26-2001, 07:16 PM
Hello, would this be the correct forum to ask about tabulation of results of a survey form?
I just made a HTML version of a survey form, and now I'm wondering would Microsoft Access be the correct software to use so as to link the results of the survey to a database
And how would I do that?
VamPuke
11-26-2001, 07:17 PM
BTW, I'm a total absolute newbie at Microsoft Access
jwindon
11-27-2001, 04:17 AM
Yes, Access can be used to store the results. It may involve "re-doing" your web page.
Wait for Buk-Hix to answer your post. He knows A LOT about this kind of thing.
I will be doing the same thing on several web sites, so I'm going to join your class if you don't mind.
BukHix
11-27-2001, 06:02 AM
Thanks for the heads up jwindon. VamPuke, you will need a server side script to accomplish that and since this is an Access forum and you are using Access I will a suggest ASP Script.
It looks a lot more complicated then it is. Here is a little code sample to give you and idea of how it is done.
<%
' I am using constansts here so that you could get a working example
' you could use a (adovbs.inc) include file in place of these:
Const adLockOptimistic = 3
Const adCmdTable = &H0002
' Open the connection to the database, You will need to alter
' the path after the Server.MapPath to match your own. I used
' a DSNless connection because they are the easiest to create
' and do not require tech support from your host. Just put the
' database in the directory and corret the path and name.
Dim objConn,objRs
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & _
Server.MapPath("/fpdb/maillist.mdb")
objConn.Open
' Open the MailList table and add the new record to it. "List" is the name of
' the table you can make this what ever you want.
Set objRs = Server.CreateObject("ADODB.Recordset")
objRs.Open "List", objconn, ,adLockOptimistic , adCmdTable
' Get email address from the form and add it to the address field and add them
' to the database. Request.Form is what pulls it from the previous pages form.
objRs.AddNew
objRs("Address") = Request.Form("EmailAdd")
objRs.Update
' Close the objects and free resources
objRs.Close
Set objRs = Nothing
objConn.Close
Set objConn = Nothing
%>
The great thing about this is that you can pretty much take this and put it on your web server saved as anyname.asp. Then when you want any form to process it you would use set your form something like this:
<form method="POST" action="../anyname.asp">
The code from above is taken from a demo application that I put together. If you want to see the demo you can check it out here.
Email Subscription Page (http://www.ritsema.com/maillist/subscribe.asp)
Actualy this demo does a couple of things. It adds your email to a database from a form. Then it sends you a email to confirm your address. Once you confirm you are taken to a page that allows you to delete your address from the database. Once you are deleted from the database you are taken to a page with all the code that was used to do this demo.
Let me know if you have more questions or feel free to post a link to your form so I can take a look at it and help you get started.
BukHix
11-27-2001, 06:12 AM
I just made a HTML version of a survey form
One more question, when you say an HTML version of your form do you mean a real HTML form or an Access rendition of an HTML form?