Save to Database and Pass Field Value to second form

X

xx75vulcan

Ok- here's what i got.

I Used to have a really long form. It's an employement form, that
allows applicants to apply online.

The form works great. However, if the users completes all available
fields, the database spits out a record too large error.

I would like to split the MS ACCESS database into several tables. I've
been told there's no way to submit the data on the form into two
different tables without having the user hit two different submit
buttons.

So I broke the application up into two asp pages. First page (form)
asks personal contact info and upon clicking submit stores to a
database table called personal. The confirmation page is set to take
the user to the second form where they will answer all the professional
questions, and upon clicking submit stores to a table called
professional.

I need to be able to have the second form remember the user's SSN so
taht later, when we quiry the database, and want to pull back
information, we can pull from both tables, simply by using the SSN as
the key.

I can't figure out how to have the first form submit to a database, and
pass the "SSN" field's value to the second form.

Help please!
 
S

Stefan B Rusynko

On your processing page of form 1 (writing to table 1)
- with a form field named "SSN" use
Session("SSN") = Request.Form("SSN")
Then in your second form add the SSN as a hidden form field for the 2nd table
<input type="hidden" name="SSN" value="<%=Session("SSN")%>">

PS
You may want to make the field SSN in the 2 tables a 1 to 1 relationship (cascade integrity)

--

_____________________________________________
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
_____________________________________________


| Ok- here's what i got.
|
| I Used to have a really long form. It's an employement form, that
| allows applicants to apply online.
|
| The form works great. However, if the users completes all available
| fields, the database spits out a record too large error.
|
| I would like to split the MS ACCESS database into several tables. I've
| been told there's no way to submit the data on the form into two
| different tables without having the user hit two different submit
| buttons.
|
| So I broke the application up into two asp pages. First page (form)
| asks personal contact info and upon clicking submit stores to a
| database table called personal. The confirmation page is set to take
| the user to the second form where they will answer all the professional
| questions, and upon clicking submit stores to a table called
| professional.
|
| I need to be able to have the second form remember the user's SSN so
| taht later, when we quiry the database, and want to pull back
| information, we can pull from both tables, simply by using the SSN as
| the key.
|
| I can't figure out how to have the first form submit to a database, and
| pass the "SSN" field's value to the second form.
|
| Help please!
|
 
X

xx75vulcan

Is it correct, that there is no way to do a join on Insert Statement
and post to two tables at once? Even though they're in the same
Database file?
 
X

xx75vulcan

In the first form, where do I put the statement:

Session("SSN") = Request.Form("SSN")

Just anywhere between the <form> and </form> tags?
 
S

Stefan B Rusynko

You don't put it in the 1st form page at all
you put it in the page the 1st form is sending results to

Yes between the form tags

--

_____________________________________________
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
_____________________________________________


| In the first form, where do I put the statement:
|
| Session("SSN") = Request.Form("SSN")
|
| Just anywhere between the <form> and </form> tags?
|
 

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