I have a combo box on access form from which a user can select a particular year, say 2014 from a drop-down. Another combo box exists on this form which has a drop-down of the week numbers from 1 to 53. These two combo boxes are not linked. (Or do I have to link/bound them?)
Also, there are two text boxes named, "WeekStart" and "WeekEnd" on this form.
What I want to do is to have the week start and end dates for the selected week number and year to be populated in the "WeekStart" and "WeekEnd" textboxes. I'm starting my week on a Sunday. I put this code in the "After Update" event of the "week number" combo box.
But I know this is not right, and I'm stucked. Any help would be appreciated. And also, is it essential that I bound the week number to the year? If so, how do I go about that too. Thank you
Also, there are two text boxes named, "WeekStart" and "WeekEnd" on this form.
What I want to do is to have the week start and end dates for the selected week number and year to be populated in the "WeekStart" and "WeekEnd" textboxes. I'm starting my week on a Sunday. I put this code in the "After Update" event of the "week number" combo box.
Code:
Me.WeekStart = DateSerial(Me.cboYear, 1, Me.cboWeekNum * 7)
Comment