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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection Criteria

Status
Not open for further replies.

polymath5

MIS
Dec 23, 2000
512
US
Hi all,

Perhaps you can give me some direction here?
I want to find in database A records dated in the future. I want only records that have either PercentField >0 or TextField is neither empty nor "None".

Why doesn't this selection work?  Does it have something to do with the fields containing nulls?

datetime{A.Date}>{2001,07,29,00,00,00} and ( A.PercentField >0 or (not isnull(A.TextField)  and A.TextField <>&quot;None&quot;)

Thanks very much for any insights!
 
I had problem with that kind of criteria and it was beacause of the OR

Maybe try:

(datetime{A.Date}>{2001,07,29,00,00,00}and A.PercentField>0)
OR (datetime{A.Date}>{2001,07,29,00,00,00}and (not isnull(A.TextField))
OR(datetime{A.Date}>{2001,07,29,00,00,00}and A.TextField <>&quot;None&quot;)

Are you sure that you have to use {} with Datetime because i use a different way and it works fine?

I write : {ado.date} < DateTime (0, 0, 0, 00, 00, 00)

(it was for a null date)

Plus, can you tell why what goes wrong; what data you have and you don't want or what message you have...
 
A.TextField <>&quot;None&quot; will automatically skip nulls (but not empty string values).

What does your formula do wrong when you use it? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top