Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eliminate records based on certain criteria

Status
Not open for further replies.

shopwise

Technical User
Sep 22, 2008
52
US
products.Source = "SELECT ID, Price, ProductFamily, CustomText08, ManufacturerPartNumber, Description, Sort, CustomMemo02 FROM Products WHERE (products.CustomText08 <>'Yes') AND ProductFamily = " + Replace(products__MMColParam, "'", "''") + " ORDER BY Sort ASC"

with the above recordset query, I am trying to eliminate any of the products.CustomText08 fields that are equal to "Yes". When I do so, no records at all are returned even though there are many that do not equal "Yes".

However, when I try the reverse by stating "WHERE (products.CustomText08 <>'Yes')", I do get the proper results of only showing records that are equal to "Yes"

What am I doing wrong in my query?
 
What is the data type of CustomText08 in products ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Have you tried it with the other piece of criteria?

Replace(products__MMColParam, "'", "''")

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
I'm sorry. I meant "without" the second criteria.

ProDev, Builders of Affordable Software Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
How are ya shopwise . . .

If by chance [blue]CustomText08[/blue] is a [blue]Checkbox[/blue] formatted as [blue]Yes/No[/blue], then your criteria should be:
Code:
[blue]WHERE (products.CustomText08 = False)[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top