Age filter not returning correct dates

Hi Guys and Ladies
Those celebrating Christmas a blessed Christmas.

I have a question.
I manage to write a filter on a report printing that prints record of members between the ages of eg 20 and 40. the report prints members of ages above 40. When I delete a record with the dates above 40 and reenter them the report exclude them and the report will be accurate returning the correct records between 20 and 40. Can you explain why?
Many Thanks and have a prosperous 2024.

I’m not sure how you have constructed this filter but from what you say check the =<, =>, >, > and logical operators because various combinations need AND or OR according to how you have set it up. Depending on the way the age delimiters are written this result could come from an AND where it should be an OR.

Your code is bad.

To help you in your question you must show the filter Code in the CLW that was generated. Open the Embeditor or Module and find it. Include a few lines above and below.

At least paste screen captures of how to specified it in the IDE.

1 Like

Mixing AND with OR without (Parens) is usually bad code.

Clarion has the INRANGE() function that can simply code:
Option 1: MemberAge >= 20 AND MemberAge <= 40
Option 2: INRANGE(MemberAge,20,40)

If Tony is using the AGE() function that will not work because it returns a STRING like “20 YRS” not a number, and it can return DAYS or MOS for ages under 2 years.

1 Like

Thanks so much Carl. My method is working only with new records. The old records I have to delete and reenter.

Have a prosperous 2024 guys.
God bless