Range period from comboboxes to filter subform

pedruc00

New member
Local time
Today, 14:55
Joined
Mar 7, 2012
Messages
2
Hello everyone !!

I have 2 comboboxes in a form to filter the results of my subform. cboStartPeriod and cboEndPeriod. These 2 comboxes are using a valuelist with years from 2012 to 2030.

In my query that populate the subform, I have a field named "planned_periode" which store a 4-cipher year e.g. 2012.

Im using this expresion as criteria to do the filtering in the query:
Between [Forms]![frmMain]![cboStartPeriode] And [Forms]![frmMain]![cboEndPeriode]

But it doesn't work :(

In addition, the query have to show all records if the comboboxes are not selected.

Thank you all in advance for your help....

Regards

Pedruc00
 
1) What is your table look. Send some records.
2) Is cboStartPeriod or cboStartPeriode, cboEndPeriod or cboEndPeriode ??
 
Hello MStef and thank you for answering to my post, but its working NOW...

I needed to use these 2 more expressions in the query criteria to make it work:
>= [Forms]![frmMain]![cboStartPeriod]
<=
[Forms]![frmMain]![cboEndPeriod]
in addition to:Between [Forms]![frmMain]![cboStartPeriod] And [Forms]![frmMain]![cboEndPeriod]

Now the filter shows all records when the form is loaded and the periods I choose from the comboboxes in ascending order. Its working nicely !

Thanks againg for your quick answer......

regards

Pedro
 

Users who are viewing this thread

Back
Top Bottom