Passing data between ASP pages

J

Jim Wilson

Can someone tell me how I could pass information from two
text boexes on my form to a query that runs when I open
another form that is based on a query with two items in
the criteria of this query. I've tryed using attion on
the post line of the first form but I am not sure how to
pass the data.

Any Help
Jim
 
J

Jim Buyens

First, make sure your two text boxes and your submit
button are all in the same HTML form.

Then, right-click each text box and give it a short, easy
name you can remember. I recommend all lower case, no
spaces, no special characters. bdate or birthdate are
good; Birth Date is bad.

I presume your query page will use the Database Results
Wizard. If so, on page 3 of the wizard, click More
Options, Criteria, and then Add (twice) to add the two
form field names from the first page. Be sure Use This
Search Form Field is checked.

Finally, on page 5 of the wizard, make sure Add Search
Form is *not* selected.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------




Then, on your second page
 
J

Jim Wilson

I think I understand what your saying and I've done all
of this, but the value in the two text boxes is not being
passed to the new page with the result query on it. All
I get back is no records found.

Jim
 
M

MD Websunlimited

Hi Jim,

Sorry but the explanation of the problem sound illogical. Could you phase it differently so that it makes more sense?
 
J

Jim Buyens

Open your query page, switch to Code view, and add the following right
after the <body> tag.

<p><%=request("nameoftextbox1")%></p>
<p><%=request("nameoftextbox2")%></p>

where nameoftextbox1 and nameoftextbox2 are the names that appear
when,
in the first page, you right-click the text boxes and choose Form
Field Properties.

Having does this and saved the page, running a query should display
the two text box values at the top of the query page. If the values
appear blank on the second page, then the problem is on the first
page. If the values appear correctly, then the problem is on the query
page.

Once you have this information, post it to this thread.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jim Wilson

Thank You for all your help onn this, its not work for me.

Jim Wilson

-----Original Message-----
Open your query page, switch to Code view, and add the following right
after the <body> tag.

<p><%=request("nameoftextbox1")%></p>
<p><%=request("nameoftextbox2")%></p>

where nameoftextbox1 and nameoftextbox2 are the names that appear
when,
in the first page, you right-click the text boxes and choose Form
Field Properties.

Having does this and saved the page, running a query should display
the two text box values at the top of the query page. If the values
appear blank on the second page, then the problem is on the first
page. If the values appear correctly, then the problem is on the query
page.

Once you have this information, post it to this thread.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


"Jim Wilson" <[email protected]> wrote
in message [email protected]>...
 
J

Jim Buyens

Look, you need to give me more information. If all you can tell me
is "its not work for me" then all I can tell you is "fix something".

Please open the Web page that displays your two text boxes, switch to
Code view, copy everything from the <form> tag to the </form> tag, and
past it into a response to this message.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jim Wilson

I very sorry but the last reply should have said "Thank
You" for everything now work for me. You were a grate
help to me.

Thank You
Jim
-----Original Message-----
Look, you need to give me more information. If all you can tell me
is "its not work for me" then all I can tell you is "fix something".

Please open the Web page that displays your two text boxes, switch to
Code view, copy everything from the <form> tag to the
past it into a response to this message.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------





"Jim Wilson" <[email protected]> wrote
in message [email protected]>...
 

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