How to enlarge Date Picker?

  • Thread starter Birgit via AccessMonster.com
  • Start date
B

Birgit via AccessMonster.com

It would be very handy if the Date Picker in Acces 2007 could be enlarged on
the event "On Enter". How it should be done? Is it possible?
 
M

Minton M

It would be very handy if the Date Picker in Acces 2007 could be enlarged on
the event "On Enter". How it should be done? Is it possible?

I have the feeling the answer is no but I'd be fascinated if one of
the gurus knew of a clever way to do this. I had exactly the same
question earlier this week.

-- James
 
L

Linq Adams via AccessMonster.com

I suspect James is right. The workaround, I think, would be to place a
command button with a calendar image on the form, have the DP invisible, and
in the OnClick event of the button make the DP visible.

What I do for this type of thing is place a DatePicker control on the form,
positioned as you like and set it's Visible Property to NO.

Then, using the DoubleClick property of your text box, have the DatePicker
"popup" for date selection. You'll need to replace YourDatePickerName and
YourTextBoxName with the actual names of your DatePicker and text box.

Private Sub YourTextBoxName_DblClick(Cancel As Integer)
YourDatePickerName.Visible = True
End Sub

Private Sub Form_Load()
YourDatePickerName.Value = Date
End Sub

Private Sub YourDatePickerName_Click()
YourTextBoxName.Value = YourDatePickerName.Value
YourTextBoxName.SetFocus
YourDatePickerName.Visible = False
End Sub

Now, all your user has to do is DoubleClick on the text box and up pops the
DatePicker! When the user clicks on the date, the DatePicker disappears and
the text box is populated with the date.

Linq
 

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

Top