Timesheet

D

David W

I am using an active x controller of the date picker in a form.
Is there a way that I can get the date selected then populate 7 textboxes to
show the week that was selected?
 
C

Conrad

Yep, sample below.

dteDate = Calendar0.Value 'Calendar0 being the name of the calendar control.
txtBox1 = dteDate
'Loop thru and assign each text box a date 1 day greater then the last.
For x = 2 To 7
txtBox & x = DateAdd("d", 1, dteDate)
Next
 
P

PC Datasheet

Nope, txtBox2 to txtBox7 will all have the same date, ie 1 day after the
date selected on the calendar.

How about ---

Dim dteDate As Date
dteDate = Calendar0.Value 'Calendar0 being the name of the calendar control.
txtBox1 = dteDate
'Loop thru and assign each text box a date 1 day greater then the last.
For x = 2 To 7
dteDate = DateAdd("d", 1, dteDate)
txtBox & x = dteDate
Next

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
[email protected]
www.pcdatasheet.com
 
Top