Show Dates for the Month via a form and filter the query based on Form

CSP12345

Board Regular
Joined
Oct 1, 2014
Messages
52
Ok I have a Query and a form, in the query I have dates of next service eg, "29-Mar-2015" and I need to be able to type in a text field in the form eg"Mar-2015" and filter all the results in the query.

Does that make sense?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Put 2 text boxes on form...txtStartDate, txtEndDate. (name them in properties, other tab, name)

in your query set the criteria to
[DateOfEvent] between forms!frmRpts!txtSTartDate and forms!frmRpts!txtEndDate
 
Upvote 0
adding on ... almost right

Code:
[DateOfEvent] between DateValue(forms!frmRpts!txtSTartDate) and DateValue(forms!frmRpts!txtEndDate)

since unbound textboxes are TEXT they must be converted
 
Upvote 0

Forum statistics

Threads
1,221,832
Messages
6,162,255
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top