Show prior week in the Date Picker

  • Thread starter Thread starter Olly
  • Start date Start date
O

Olly

I'm using the date picker to allow user to select the date. However,
they need to enter a large amount of data. So I was wondering is it
possible to force the prior week to be displayed, at the beginning of
a new month?

For example at the beginning of Feb 2010, they are entering
information for the week 25 - 31 Jan. I would like to be able to push
the calendar back by a week, and show them this date, so that they
don't need to click back to the prior month.

Thanks
Olly
 
hi Olly,

I'm using the date picker to allow user to select the date. However,
they need to enter a large amount of data. So I was wondering is it
possible to force the prior week to be displayed, at the beginning of
a new month?
Simply set the value of the DateTimePicker in code, e.g. something like

dtpStart.Value = DateSerial(Year(Now()), Month(Now()) - 1, 1)


mfG
--> stefan <--
 
hi Olly,

On 09.02.2010 17:33, Olly wrote:>

Simply set the value of the DateTimePicker in code, e.g. something like

   dtpStart.Value = DateSerial(Year(Now()), Month(Now()) - 1, 1)

mfG
--> stefan <--

I tried the code as you suggested, however this just resulted in the
01/01/2010 being inserted into the textbox. I added the code into the
"On Click" event. The textbox with the datepicker attached is called
"startDate". The resulting code follows:

Private Sub startDate_Click()
StartDate.Value = DateSerial(Year(Now()), Month(Now()) - 1, 1)
End Sub

cheers
Olly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Time picker 1
Pulling last week's data 4
Date Picker 2
Date problem 4
Auto Calendar not showing up in date fields 2
Date Picker Default? 1
Can I turn off the date picker? 2
Excel Help with dates 2

Back
Top