Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Recordset on Submit button...

Status
Not open for further replies.

mmaz

Programmer
Nov 22, 2000
347
Hello! I'm trying to open a connection and create a recordset when the user selects a Submit button. Is this possible?

I have a page with 2 textfields, Start Date and End Date. When the user clicks Submit, I want to retrieve the records in the db where the date is between Start Date and End Date...the code should be on the same page... Any ideas??

Thank you in advance!!
 
well, you can have the page submit to itself,

<%
if(Request.Form('startdate') == '')
{
%>

form code here.

%>
}
<%
else
{
%>

database connection and recorset retrieval...

code for displaying and formating data.
<%
}
%>
 
Thank you luciddream, but I have to submit to another page. I'm calling a Crystal Reports from another ASP, and I guess I'm just wondering if it's possible to do this in two pages instead of three... hence creating the recordset from a query based on Start Date and End Date textfields, all this on the Submit button.

I already got it working with 3 but it would be nice if I could do it with 2 pages. Any more ideas? Thank you!! :)
 
its impossible for you to create your recordset and do the crystal reports stuff at the same time?
 
Well, you see, I'm working with 20 reports and I'm trying to re-use the code to call and create the Crystal Reports object because it is quite extensive.

I'd like the first ASP to be specific to each report and the second page to be generic. So the first page (where the user enters the Start Date and End Date) should &quot;Post&quot; to the second page (where the code for calling Crystal Reports is).

I would like to use my first page to open a connection, create the recordset based on a query and then when the user selects the submit button, this would send the information to the second page, which is responsible for creating and calling the Reports.

Can this be done?? Thanks for your help, luciddream!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top