Hi all,
I have a continuous form with a filter by form header. Upon opening the form I would like to filter it so that only the last year's worth of records show and have the StartSoldDate txtbox in the header have the current date - 1 year. I have the header box working (I'm just putting in the date but not creating a new filter since it would load completely and then refilter).
The textbox in the form is SoldDate. I can't get it to filter upon loading.
Here's my code:
Dim dtYrAgo As Date
dtYrAgo = DateAdd("yyyy", -1, Date)
DoCmd.OpenForm "Search_SoldAttributes", , , "SoldDate = #" & dtYrAgo & "#"
Forms!Search_SoldAttributes.tbSoldStartDate = dtYrAgo
Thanks for you help!
Connie
__._,_.___
.
__,_._,___
Tidak ada komentar:
Posting Komentar