combo

hellox3

New member
Local time
, 19:34
Joined
Jan 12, 2013
Messages
3
How to create a date interval using combo box?

For example, i have a receipt form consisting of receipt date from 1/1/2012 to 31/06/2012.

But I want to view the receipt form to just show the date from 1/3/2012 to 1/4/2012.

Can please help me with it? Thanks.
 
I would put 2 combob boxes in the form header. Use the receipt date as the control source and make the list distinct (a distinct list will not show duplicates, so SELECT DISTINCT SomeField FROM SomeTable; ). One combo is the From Date and the other combo is the To Date. Then place a command button next to the To Date combo. In the command buttons on click event use the following;

Me.FilterOn = False
Me.Filter = "([ReceiptDate] BETWEEN #" & Me.ComboFrom & "'# AND #" & Me.ComboTo & "#)"
Me.FilterOn = True
 

Users who are viewing this thread

Back
Top Bottom