Date to From filter

Stopher007

Registered User.
Local time
Tomorrow, 01:38
Joined
Nov 2, 2003
Messages
11
IS there a link or can anyone give me a few pointers on how to set up a Date to From filter on my form that is linked to a List Box. Just wondering if there is an easy way, plz:rolleyes:
 
Two textboxes on a form: txtFrom and txtTo

In the date field of your listbox's RowSource put the criteria

Between [Forms]![MyForm]![txtFrom] And [Forms]![MyForm]![txtTo]

and requery the listbox every time you change a date.
 
Following on from this, how do you put multiple criteria in the SQL without the filter criteria conflicting. I have tried putting criteria linked to mulitple Comboboxes, but they either all have to have data or it just doesn't work. I need them to work independantly if a single filter is entered or as a group when more than one has data.
 
If you are putting your criteriaon the same line then you saying: "give me this AND this AND that" when what you want to do is move each criteria to the next line so that you are saying "give me this OR this OR that".
 
Do you do this for one field, as putt all the criteria into seperate lines in a single field, or put the criteria into the criteria line under the field that the combo box refers.
 
Stopher007 said:
put the criteria into the criteria line under the field that the combo box refers.

That one...
 
I tries that and it still doesn't allow you to filter by one combobox or multiple comboboxes on the same form for a single listbox
 
Can you post a small example or your SQL for the listbox's RowSource?
 
I use [Forms]![MyForm]![MyCombobox] for each criteria that refers to a combo box on MyForm
 
Mile-O-Phile said:
Can you post a small example or your SQL for the listbox's RowSource?

Okay, but how about answering that question? :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom