User Validation of Data before submit to database

G

Guest

I have a form which submits to an access database.
I would like to display the data back to the user before it is submitted to
the database.
I have made a second page which displays the data back. Then submit is
pressed to display a confirmation page that data has been sent to database.
Currently, the data displays back on the second page, and when submit is
pressed the confirmation page comes up and a record is added to the database.
However, the record has no values in it.
Somehow between page 2 and 3 the data has been lost...any ideas what I'm
missing?
 
T

Thomas A. Rowe

You have to manually take the values from the first page, and pass them to the second page which is
then submitted to the database.

On the verification form page set the initial field value as shown below for each form field on the
first page.:

<%=Request.Form("1stPageFieldname")%>
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
G

Guest

I have that on the second page, and the data displays fine. Now I want to
post that to the database. This is part of the code I have on the third
page...

<%
Set Rs1 = Server.CreateObject("ADODB.Recordset")
Rs1.Open "tblCheckRequests", sDSN, adOpenDynamic, adLockOptimistic, adCmdTable
Rs1.AddNew
Rs1("RequestDate") = Request.Form("frmRequestDate")
....

However, the Request.Form("frmRequestDate") and all the other fields are
blank on the third page, even though they are the same field name as the
previous page.

Any ideas?
 
T

Thomas A. Rowe

I do not use the format that you are using to actually submit info to the database, so I can not
help you.

If you are using the FP database component, then make the form/process created by FP as your 2nd
page and confirmation page and just create standard FP form that post to the FP Database component
generated form.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
S

Stefan B Rusynko

See http://www.w3schools.com/ado/ado_add.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I have that on the second page, and the data displays fine. Now I want to
| post that to the database. This is part of the code I have on the third
| page...
|
| <%
| Set Rs1 = Server.CreateObject("ADODB.Recordset")
| Rs1.Open "tblCheckRequests", sDSN, adOpenDynamic, adLockOptimistic, adCmdTable
| Rs1.AddNew
| Rs1("RequestDate") = Request.Form("frmRequestDate")
| ...
|
| However, the Request.Form("frmRequestDate") and all the other fields are
| blank on the third page, even though they are the same field name as the
| previous page.
|
| Any ideas?
|
|
|
|
| "Thomas A. Rowe" wrote:
|
| > You have to manually take the values from the first page, and pass them to the second page which is
| > then submitted to the database.
| >
| > On the verification form page set the initial field value as shown below for each form field on the
| > first page.:
| >
| > <%=Request.Form("1stPageFieldname")%>
| > --
| > ==============================================
| > Thomas A. Rowe (Microsoft MVP - FrontPage)
| > ==============================================
| > If you feel your current issue is a results of installing
| > a Service Pack or security update, please contact
| > Microsoft Product Support Services:
| > http://support.microsoft.com
| > If the problem can be shown to have been caused by a
| > security update, then there is usually no charge for the call.
| > ==============================================
| >
| > | > >I have a form which submits to an access database.
| > > I would like to display the data back to the user before it is submitted to
| > > the database.
| > > I have made a second page which displays the data back. Then submit is
| > > pressed to display a confirmation page that data has been sent to database.
| > > Currently, the data displays back on the second page, and when submit is
| > > pressed the confirmation page comes up and a record is added to the database.
| > > However, the record has no values in it.
| > > Somehow between page 2 and 3 the data has been lost...any ideas what I'm
| > > missing?
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top