Sort a range of Dates on a subform

  • Thread starter Thread starter ldiaz
  • Start date Start date
L

ldiaz

I have a Form and a Subform where I have datas and every record has a field
named: Wdate
also I have a field where I put a date
I would like to press a button to sort equal or less dates than the date
that I put on the field,

please help

Thanks in advance
 
I have a Form and a Subform where I have datas and every record has a field
named: Wdate
also I have a field where I put a date
I would like to press a button to sort equal or less dates than the date
that I put on the field,

please help

Thanks in advance

The word "Sort" means "take a set of records and put them in a particular
order".

What do you mean by "sort equal or less dates"? The word does not seem to make
sense in this context.

What result do you want to see?
 
trust that you know that one can simply put a cursor in any textbox and press
the A-Z button to sort a form...

To do it the way you want then you would have an unbound text box to hold
that date in the main form and all the data in a subform...

Your subform needs to be sourced on a query that has its criteria based on
this unbound text box value.

add a button in the main form and write its function to requery the subform
 
I mean put a criteria where subform only shows datas with a range for
example all datas equal or oldest than Feb/10/08

I have other cirteria on the same subform to filter Planner Code

this is the code I use on the source of the subform
Like Nz([Forms]![IDVolatilDBID_LineA]![Planner_Co],"*")



please help
 
I mean put a criteria where subform only shows datas with a range for
example all datas equal or oldest than Feb/10/08

Ok... should have realized you're making a rather common error, using the word
"sort" where the operation should actully be called "filter" or "select".
I have other cirteria on the same subform to filter Planner Code

this is the code I use on the source of the subform
Like Nz([Forms]![IDVolatilDBID_LineA]![Planner_Co],"*")

Just use a criterion on the date of

<= #2/10/2008#

or

<= [Forms]![IDVolatilDBID_LineA]![WDate]

It can be helpful to put the critrion [Forms]![IDVolatilDBID_LineA]![WDate]
into the query's Paramters, specifying that it's a date/time parameter.
 
Back
Top