Subform does not return filtered and ordered records

G

Guest

Link fields is Description

In Sub Form
Filter= FORMAT$(chktran.CheckDate,"yyyy") >=2004
Order by= chktran.CheckNumber DESC

But it returns all records (all Years) matching description and in ascending
order.
Can anyone explain ?
 
A

Allen Browne

The Format() function returns a string value.
ry taking the Year() of the date field instead i.e.:

.Filter = "Year([chktran].[CheckDate]) >= 2004"
.FilterOn = True

It is important to set the FilterOn property at runtime as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top