Adding a default value to limit database results

G

Guest

I have a web site page that is linked to an Access database. My problem is
when the page opens it pulls all records from the database. (about 1000). I
also have a search field on the page. If I put a default value in to limit
the entry results I'm limited based on that default value when I use the
search field. Is there a way to not pull results when I open the page. Or
is there a better way I'm not thinking about.
 
K

Kathleen Anderson [MVP - FrontPage]

How to prevent DBRW from returning results before searching

Make a copy of your page and remove the results region from the first.asp.
Set the form properties of both pages to POST to the second.asp. In Normal
View, right-click on the form, select Form Properties, Send to other: Custom
ISAPI, NSAPI, CGI, or ASP Script. Click on Options, and set the Action to:
second.asp. Click OK twice. You have now set the form in first.asp to post
to second.asp when the user hits the Submit button. If you do not want to
open a new browser window, add Target="_self" like this:

<form BOTID="0" METHOD="POST" ACTION="second.asp" Target="_self">

So, when you first access the search page (first.asp) you do not run the
DBRW through a search. You enter what you want, click button and DBRW starts
on second.asp. New searches can be performed at second.asp too.

Courtesy of: William Lee


--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
blog: http://msmvps.com/spiderwebwoman/category/321.aspx
 

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