That is the correct result for contain (like) Virginia
- since Virginia is in Virginia and West Virginia
To limit to Only Virginia you need to delete the AND
fp_sQry="SELECT * FROM tblCompany WHERE (ContactState = '::ContactState::')"
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________
|I do have a drop down list with all the states including the option of
| "Select All". But when I use the DRW and use contain, if I select Virginia, I
| get Virginia and West Virgina.
|
| Here's the code from DRW:
| fp_sQry="SELECT * FROM tblCompany WHERE (ContactState = '::ContactState::'
| AND ContactState LIKE '%::ContactState::%')"
| fp_sDefault="ContactState=&ContactState="
|
|
| "Kevin Spencer" wrote:
|
| > Let's have a look at the actual query.
| >
| > The behavior you're describing is correct for a wildcard search. I don't
| > know anything about your requirements, however. If you want to search for a
| > state, how about using a drop-down list box? One of the purposes of a
| > drop-down list box is to prevent user error in typing in search values.
| >
| > --
| > HTH,
| >
| > Kevin Spencer
| > Microsoft MVP
| > ..Net Developer
| > What You Seek Is What You Get.
| >
| > | > >I have used the query designed for the Select All values by using the
| > > wildcard "*" and using the word "contain". The problem that I am having
| > > now
| > > is that if I select Virginia, records with West Virginia are showing up.
| > > If I
| > > use the criteria using the word "equal" then the select all query results
| > > are
| > > not being displayed. Does anyone have any clues?
| >
| >
| >