navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Alpha Search form

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Alpha Search form
Page: [1]
 
WIryeman

 

Posts: 14
Joined: 2/27/2003
Status: offline

 
Alpha Search form - 3/9/2003 0:53:53   
I am struggling to get a search query to work correctly I want to search via a text box on page 1 , by entering a single beginig alpha ie A = Adam Apple, Aersol etc. I know with A my database has 48 records that start with A. The probem I have the search only returns 7 distinct records and an 8th record that repeats the last entry. If I use B it returns and repeats and if I use M it only returns 1 record out of 70. Below is my sql.

SELECT * FROM qryAll WHERE (Lake LIKE ' ::Alpha::%' ) ORDER BY Lake ASC

Alpha is form and textbox name

Help
Thanks
Ryeman

_____________________________

May Your Boots Dry Quickly
hhammash

 

Posts: 1064
Joined: 8/19/2002
Status: offline

 
RE: Alpha Search form - 3/9/2003 12:53:40   
Hi Ryeman,

Hi,

Like this?
Look at the first search drop down where it says list.

http://www.fmhs.uaeu.ac.ae/nml/Serials/JHLTitle.htm

Here is the way:

1- Insert a Drop Down on your form
2- Name the drop down with the same name of the database field
3- Add the values for the drop down. Click add, then In the Choice put
All in the value put %, and make it SELECTED, this choice will list all records
Add choices A to Z and don' t add values for each one. So, now you will have a long list starting with All and Ending with Z. Whe the user presses the drop down he/she will get:

All
A
B
C
D
..etc

Save the form. Now create a new page, insert a Database results, then Select your database, select your recordset, in step 3/5 select more options/Criteria and select the field name and select begins with. Complete the DRW and at the end in the last DRW step uncheck the " Add search form" . Save the DRW. The SQL for the DRW should look like:

SELECT * FROM qryAll WHERE (Lake LIKE ' ::alpha::%' ) ORDER BY lake ASC

Now open the form page again where you have the DROP DOWN and post it to the New DRW which you created. So if you saved your DRW as Alpha.asp post your form to Alpha.asp

Best regards
Hisham


(in reply to WIryeman)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Alpha Search form
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts