The combo box isn't mine... i guess that last post was confusing.
I have a report that is based on a query. The report lists entries by week (its a sales by week report). Both work fine.
However, I need to use a form to enter criteria. I need to be able to look at any week's report, not just this week's. As the query works by asking start and end date, I put two text boxes on my form: StartDate and EndDate. This also works great... type in the start date, type in the end date, hit go and hey presto!
However, I decided to use the calendar example to automate the process. This too works... click on StartDate and a calendar pops up. The value you select then becomes the value for StartDate. However, I still have to manually enter the end date.
As the start date is always a Monday, and the end date is always a Saturday, all I want is for EndDate to automatically be StartDate + 5 days. I tried Val([StartDate]) +5, but this only changes the first value, i.e. Start date 1/2/2004, End date becomes 6/1/1900!!
I figure that the answer lies in the function from the MS help thing:
Public Function LstDayCurWeek(InDate As Date) As Date
LstDayCurWeek = InDate - Weekday(InDate) + 7
End Function
...but how to use it to auto update my EndDate value?
As I mentioned, I've seen it work on a form with a combo box (the combo box selects which function you want - end of week, start of week, end of month.....) but mine should be simpler, as I only want 1 fixed function. The code for working on that combo box was:
Me.txtReqDate = Eval (Me.cmbFunction & "(#" & Me.txtBaseDate & "#)")
...so I figured it must be something along those lines?
Thanks for all the help guys!
