Creating One Query to use in FrontPage Instead of 26

G

Guest

Hello,

I am attempting to develope a page that list the alphabet across the top.
My Access database has three simple fields. I would like to have the ability
for the user to click on a letter of the alphabet and a query would run and
bring up the information based on that letter. I know have to make a query
for each letter, but would rather not have 26 different pages. I don't have
much SQL or VB knowledge. Can someone please help.

Sam
 
J

Jon Spivey

Hi Sam,

Assuming you want to query on first letter, ie starts with a starts with b
etc you could make your links like this
<a href="Results.asp?letter=a">Starts with A</a>
<a href="Results.asp?letter=b">Starts with B</a>
and so on.

Then on your results page if you're using the FP wizard you can enter this
query,
select * from table where fieldname like '::letter::%'
if you're coding this you can do
<%
sql="select * from table where fieldname like '" &
request.querystring("letter") & "%'"
' execute your query
%>
 
G

Guest

Thank you for the response. The first part of your response should be placed
in the "code" section of FrontPage, correct?
 
G

Guest

Hi,

Here is the query that I would be using based on your suggestion. I didn't
follow the last part of your query response:

SELECT Labels.Label, Labels.Name, Labels.Picture
FROM Labels
WHERE ((Labels.Name) Like

Thank you for all your help
 
J

John Kisha

If you are hand-coding, than you would use the second example given <%
...... %> and place it in the "code" section.

If you are using the FrontPage wizard to create your results page, you
would use his first example.

Either way returns the same result. Pick and use only one. :)

John Kisha
Inland Pacific Consulting
http://www.VisitUsAt.com
323-463-8300

-----Original Message-----
From: Sam B. [mailto:[email protected]]
Posted At: Friday, December 24, 2004 11:59 AM
Posted To: microsoft.public.frontpage.client
Conversation: Creating One Query to use in FrontPage Instead of 26
Subject: Re: Creating One Query to use in FrontPage Instead of 26

Hi,

Here is the query that I would be using based on your suggestion. I
didn't
follow the last part of your query response:

SELECT Labels.Label, Labels.Name, Labels.Picture
FROM Labels
WHERE ((Labels.Name) Like

Thank you for all your help
 
G

Guest

I don't have a lot of knowledge in SQL so I'm hoping someone can help me
finish the statement I listed below.

John Kisha said:
If you are hand-coding, than you would use the second example given <%
...... %> and place it in the "code" section.

If you are using the FrontPage wizard to create your results page, you
would use his first example.

Either way returns the same result. Pick and use only one. :)

John Kisha
Inland Pacific Consulting
http://www.VisitUsAt.com
323-463-8300

-----Original Message-----
From: Sam B. [mailto:[email protected]]
Posted At: Friday, December 24, 2004 11:59 AM
Posted To: microsoft.public.frontpage.client
Conversation: Creating One Query to use in FrontPage Instead of 26
Subject: Re: Creating One Query to use in FrontPage Instead of 26

Hi,

Here is the query that I would be using based on your suggestion. I
didn't
follow the last part of your query response:

SELECT Labels.Label, Labels.Name, Labels.Picture
FROM Labels
WHERE ((Labels.Name) Like

Thank you for all your help

Sam B. said:
Thank you for the response. The first part of your response should be placed
in the "code" section of FrontPage, correct?
 

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