A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date Picker



 
 
Thread Tools Display Modes
  #1  
Old January 2nd, 2008, 07:41 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Date Picker

Hello,

Is there a VBA method to bring up a calander without having to click the
DatePicker icon for a date control?

Thank you and God Bless,

Mark A. Sam


  #2  
Old January 2nd, 2008, 08:11 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Date Picker

Not sure of exactly what you have in mind, but here's a routine that I use:.

If you'd like to only have the DatePicker appear when you need to pick a date,
you can use this routine.

YourTextBoxName is the name of the box that will hold the date

YourDatePickerName is the name of your DatePicker.

First, place the DatePicker where you want it to appear on the form.

Next, select the DatePicker and goto Properties--Format and set Visible = No

Then place this code in the form's code module:

Private Sub Form_Load()
YourDatePickerName = Date
End Sub

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

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

Now, when your user DoubleClicks on the textbox where the date will go, the
DatePicker will appear. The date is picked, and the DatePicker disappears!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200801/1

  #3  
Old January 2nd, 2008, 08:40 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Date Picker

Linq,

Are you talking about an ActiveX control named "DatePicker"? I am referring
to the Datepicker that is built into a Textbox linked to a date field in
Access 2007. When the field gets the focus, an icon appears and the
calendar pops up. There is a property for the textbox called,
ShowDatePicker with options, "For Dates" and never. If there was a third
choice, "Always" that would solve my issue. If a user clicks on the
textbox, he has to then click on the icon. I want to bypass that step so
that if he click on the control, the Calendar pops up immediately.

I don't now if that makes sense, but I just want to bring up the calander
with one click rather than two.

God Bless,

Mark


"Linq Adams via AccessMonster.com" u28780@uwe wrote in message
news:7d9f5eaf24480@uwe...
Not sure of exactly what you have in mind, but here's a routine that I
use:.

If you'd like to only have the DatePicker appear when you need to pick a
date,
you can use this routine.

YourTextBoxName is the name of the box that will hold the date

YourDatePickerName is the name of your DatePicker.

First, place the DatePicker where you want it to appear on the form.

Next, select the DatePicker and goto Properties--Format and set Visible =
No

Then place this code in the form's code module:

Private Sub Form_Load()
YourDatePickerName = Date
End Sub

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

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

Now, when your user DoubleClicks on the textbox where the date will go,
the
DatePicker will appear. The date is picked, and the DatePicker disappears!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200801/1



  #4  
Old January 2nd, 2008, 11:42 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Date Picker

Sorry! You really need to ***always*** include the fact that you're running
2007 when posting a thread! The differences between 2007 and all previous
versions are so great!

Don't have a clue since it's 2007. You desire to have only one click to bring
up the calendar is more than reasonable! Since the entire purpose of using a
calendar is to facilitate the easy, accurate entry of dates, common sense
would dictate that if the developer chose to have one pop up, it would do so
when the field was entered! If I use a calendar, it means I don't want my
users to input the date manually! But, of course, we're talking about Micro
$oft!

Maybe someone who's using 2007 has a workaround.

Good Luck!

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200801/1

  #5  
Old January 3rd, 2008, 05:25 PM posted to microsoft.public.access.forms
Jeff Conrad [MSFT]
external usenet poster
 
Posts: 233
Default Date Picker

Hi Mark,

Just use this code when the control gets focus:

DoCmd.RunCommand acCmdShowDatePicker

--
Jeff Conrad - Access Junkie - MVP Alumni
SDET - XAS Services - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------

"Mark A. Sam" wrote in message:
...

Are you talking about an ActiveX control named "DatePicker"? I am
referring to the Datepicker that is built into a Textbox linked to a date
field in Access 2007. When the field gets the focus, an icon appears and
the calendar pops up. There is a property for the textbox called,
ShowDatePicker with options, "For Dates" and never. If there was a third
choice, "Always" that would solve my issue. If a user clicks on the
textbox, he has to then click on the icon. I want to bypass that step so
that if he click on the control, the Calendar pops up immediately.

I don't now if that makes sense, but I just want to bring up the calander
with one click rather than two.



  #6  
Old January 3rd, 2008, 09:07 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Date Picker

That's what I wanted. Thanks Jeff.


"Jeff Conrad [MSFT]" wrote in message
...
Hi Mark,

Just use this code when the control gets focus:

DoCmd.RunCommand acCmdShowDatePicker

--
Jeff Conrad - Access Junkie - MVP Alumni
SDET - XAS Services - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------

"Mark A. Sam" wrote in message:
...

Are you talking about an ActiveX control named "DatePicker"? I am
referring to the Datepicker that is built into a Textbox linked to a date
field in Access 2007. When the field gets the focus, an icon appears and
the calendar pops up. There is a property for the textbox called,
ShowDatePicker with options, "For Dates" and never. If there was a third
choice, "Always" that would solve my issue. If a user clicks on the
textbox, he has to then click on the icon. I want to bypass that step so
that if he click on the control, the Calendar pops up immediately.

I don't now if that makes sense, but I just want to bring up the calander
with one click rather than two.





  #7  
Old January 4th, 2008, 07:37 PM posted to microsoft.public.access.forms
Jeff Conrad [MSFT]
external usenet poster
 
Posts: 233
Default Date Picker

No problem, glad to help.

--
Jeff Conrad - Access Junkie - MVP Alumni
SDET - XAS Services - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------

"Mark A. Sam" wrote in message:
...

That's what I wanted. Thanks Jeff.



  #8  
Old January 4th, 2008, 08:17 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Date Picker

Jeff,

I implemted this and on the first trial of the app, the user remarked that
she liked it. Thanks again.

God Bless,

Mark


"Jeff Conrad [MSFT]" wrote in message
...
No problem, glad to help.

--
Jeff Conrad - Access Junkie - MVP Alumni
SDET - XAS Services - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no
rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------

"Mark A. Sam" wrote in message:
...

That's what I wanted. Thanks Jeff.





  #9  
Old January 7th, 2008, 05:04 PM posted to microsoft.public.access.forms
Jeff Conrad [MSFT]
external usenet poster
 
Posts: 233
Default Date Picker

Excellent, glad to help!

--
Jeff Conrad - Access Junkie - MVP Alumni
SDET - XAS Services - Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------

"Mark A. Sam" wrote in message:
...

Jeff,

I implemted this and on the first trial of the app, the user remarked that
she liked it. Thanks again.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.