Access db search result behaviour

Access db search result behaviour

am 25.08.2006 13:31:13 von Richard Rosser

Hi all.

The following search was built with frontpage 2002 to query an
Access table. At the moment it insists on a value in both
fields or returns an error. How do I write this so an answer
in either one or none or all fields produces an answer.
i.e. if no fields of the search form are completed the entire
table is the result, and if one or more fields are completed
it simply 'narrows' the search?

AGE
"
size="20">

CITY
"
size="20">

These are only two of the fields here for illustration but there
are more in the search

Many thanks for any pointers

Re: Access db search result behaviour

am 25.08.2006 14:04:08 von McKirahan

"Richard Rosser" wrote in message
news:5cBHg.13390$_06.2806@newsfe4-gui.ntli.net...
> Hi all.
>
> The following search was built with frontpage 2002 to query an
> Access table. At the moment it insists on a value in both
> fields or returns an error. How do I write this so an answer
> in either one or none or all fields produces an answer.
> i.e. if no fields of the search form are completed the entire
> table is the result, and if one or more fields are completed
> it simply 'narrows' the search?
>
> AGE
> "
> size="20">
>
> CITY
> "
> size="20">
>
> These are only two of the fields here for illustration but there
> are more in the search

How does "it insist"? Show us that code.

I'm not familiar with "Request()"; I have heard of "Request.Cookies()"
"Request.Form()", "Request.QueryString()", Request.ServerVariables()".

URL:http://www.w3schools.com/asp/asp_ref_request.asp

URL:http://www.netzone.ch/caspdoc/Ch9_ASPBuiltIn30.html

Re: Access db search result behaviour

am 25.08.2006 14:41:39 von Richard Rosser

"McKirahan" wrote in message
news:vcmdnd5Wyft-e3PZnZ2dnUVZ_oqdnZ2d@comcast.com...
> "Richard Rosser" wrote in message
> news:5cBHg.13390$_06.2806@newsfe4-gui.ntli.net...
> > Hi all.
> >
> > The following search was built with frontpage 2002 to query an
> > Access table. At the moment it insists on a value in both
> > fields or returns an error. How do I write this so an answer
> > in either one or none or all fields produces an answer.
> > i.e. if no fields of the search form are completed the entire
> > table is the result, and if one or more fields are completed
> > it simply 'narrows' the search?
> >
> > AGE
> > "
> > size="20">
> >
> > CITY
> > "
> > size="20">
> >
> > These are only two of the fields here for illustration but there
> > are more in the search
>
> How does "it insist"? Show us that code.
>
> I'm not familiar with "Request()"; I have heard of "Request.Cookies()"
> "Request.Form()", "Request.QueryString()", Request.ServerVariables()".

It is the standard search script code written by MS FrontPage when you
generate a page containing DB Table results from an Access Table.
The whole scrit is very long - do you want to see the entire thing?

Here is the entire code

am 25.08.2006 14:45:22 von Richard Rosser







New Page 1














CITY "
size="20">
AGE "
size="20">




 






<% if 0 then %>

<% end if %>
<%
fp_sQry="SELECT * FROM Females WHERE (CITY = '::CITY::' AND AGE >
::AGE::)"
fp_sDefault="CITY=&AGE="
fp_sNoRecords=""
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=14
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>



















No records
returned.

<%=FP_FieldVal(fp_rs,"USER")%>

<%=FP_FieldVal(fp_rs,"AGE")%>

<%=FP_FieldVal(fp_rs,"CITY")%>

<%=FP_FieldVal(fp_rs,"DOMICILE")%>

<%=FP_FieldVal(fp_rs,"FIRST NAME")%>

<%=FP_FieldVal(fp_rs,"HEIGHT")%>

<%=FP_FieldVal(fp_rs,"WEIGHT")%>

<%=FP_FieldVal(fp_rs,"CHILDREN")%>

<%=FP_FieldVal(fp_rs,"PREVIOUS M")%>

<%=FP_FieldVal(fp_rs,"AGE MIN")%>

<%=FP_FieldVal(fp_rs,"AGE MAX")%>

<%=FP_FieldVal(fp_rs,"SMOKES")%>

<%=FP_FieldVal(fp_rs,"DRINKS")%>

<%=FP_FieldVal(fp_rs,"URL")%>




Re: Access db search result behaviour

am 25.08.2006 15:36:52 von McKirahan

"Richard Rosser" wrote in message
news:7eCHg.13395$_06.3625@newsfe4-gui.ntli.net...

[snip]

> It is the standard search script code written by MS FrontPage when you
> generate a page containing DB Table results from an Access Table.
> The whole scrit is very long - do you want to see the entire thing?

I'd recommend a Frontpage newsgroup such as microsoft.public.frontpage.

Re: Here is the entire code

am 04.09.2006 18:04:39 von Daniel Crichton

Richard wrote on Fri, 25 Aug 2006 12:45:22 GMT:

>