none
2010 Date Picker

    Question

  • I recently upgraded from Access 2003 to 2010. My database has many reports that are based on a STARTDATE and ENDDATE which are chosen in a separate form that opens. I had to change from my previois date picker to the only one available in Access 2010 (MSComCtl2.DTPicker.2).  The dates are supposed to be set to today's date by a macro but that no longer works. Instead, I now get an error message as soon as the date picking form opens  (Error 3 - whatever that means). Then when I try to click on the date pickers I get other error messages  "Return without GoSub".

    Any idea as to how to solve this would be greatly appreciated.  Thanks.

    Jeff

    Wednesday, September 01, 2010 8:52 PM

Answers

  • I would REALLY suggest you stay away from using ActiveX controls. In 2010 there is a built in date picker, and you don't need to use any 3rd party controls. That DTPicker.2 might be different version on other computers, and in fact might not even be installed. Also, since it is a VERY different piece of code then the previous date picker, then you have to ensure that the methods/properties of that control are the same as what you were using before (they are not).
     
    The new built in date picker is native to access, and does not requite you do drop in some special code that requires references (that are VERY prone to break when moving to other computers). About the only downside of the built in date picker is it does not display a calendar until you click on the little hover icon that appears when you enter into the date text box on the form. For the least amount of hassle, using the built in date picker is your best bet.
     
    Just drop a text box on your form, and ensure that you set the format of the text box to something like short date. You also note a setting to show the date picker (just make sure it not set to never).
     
    With the above, you have a regular text box, and no special code etc. is needed to make this work.
     

    --
    Albert D. Kallal  (Access MVP)
    Edmonton, Alberta Canada
    Pleasenospam_kallal@msn.com
     
    • Proposed as answer by -suzyQ Friday, September 03, 2010 11:45 PM
    • Marked as answer by Ji.ZhouModerator Monday, September 06, 2010 6:44 AM
    Wednesday, September 01, 2010 11:00 PM
  • On Thu, 2 Sep 2010 15:07:49 +0000, Jeff-1 wrote:
     
    > You seem to be suggesting that there is a non-Active X Date Picker within Access 2010. Could you please tell me how I can find it?
     
    Hi Jeff,
     
    It's just a property of a date control on an Access form that you can
    enable - there is no reference to any external control or component.
    Open the property sheet for your bound date field and you'll see it as
    Albert describes.
     
    Armen Stein
    Microsoft Access MVP
    www.JStreetTech.com
     
     
    Thursday, September 02, 2010 11:07 PM

All replies

  • I think we would need to see the code in your date picker form to offer any really  useful advice on this.

     

    Wednesday, September 01, 2010 9:54 PM
  • I would REALLY suggest you stay away from using ActiveX controls. In 2010 there is a built in date picker, and you don't need to use any 3rd party controls. That DTPicker.2 might be different version on other computers, and in fact might not even be installed. Also, since it is a VERY different piece of code then the previous date picker, then you have to ensure that the methods/properties of that control are the same as what you were using before (they are not).
     
    The new built in date picker is native to access, and does not requite you do drop in some special code that requires references (that are VERY prone to break when moving to other computers). About the only downside of the built in date picker is it does not display a calendar until you click on the little hover icon that appears when you enter into the date text box on the form. For the least amount of hassle, using the built in date picker is your best bet.
     
    Just drop a text box on your form, and ensure that you set the format of the text box to something like short date. You also note a setting to show the date picker (just make sure it not set to never).
     
    With the above, you have a regular text box, and no special code etc. is needed to make this work.
     

    --
    Albert D. Kallal  (Access MVP)
    Edmonton, Alberta Canada
    Pleasenospam_kallal@msn.com
     
    • Proposed as answer by -suzyQ Friday, September 03, 2010 11:45 PM
    • Marked as answer by Ji.ZhouModerator Monday, September 06, 2010 6:44 AM
    Wednesday, September 01, 2010 11:00 PM
  • Thanks Albert but I'm not sure which DatePicker I should be using.  I originally used the Calendar Control but that's no longer supported in 2010 so I went to the only option I could find in Access which is the Active X DatePicker  (MSComCtl2.DTPicker.2) and its obviously giving me lots of problems.  You seem to be suggesting that there is a non-Active X Date Picker within Access 2010. Could you please tell me how I can find it?   I wrote my database several years ago and haven't done anything with Access since so I'm pretty rusty with this to say the least (and I've only had Office 2010 for about 3 days.....

    Thanks again,

    Jeff

    Thursday, September 02, 2010 3:07 PM
  • On Thu, 2 Sep 2010 15:07:49 +0000, Jeff-1 wrote:
     
    > You seem to be suggesting that there is a non-Active X Date Picker within Access 2010. Could you please tell me how I can find it?
     
    Hi Jeff,
     
    It's just a property of a date control on an Access form that you can
    enable - there is no reference to any external control or component.
    Open the property sheet for your bound date field and you'll see it as
    Albert describes.
     
    Armen Stein
    Microsoft Access MVP
    www.JStreetTech.com
     
     
    Thursday, September 02, 2010 11:07 PM
  • OH I see. Yes it works like a charm, and easy too!  Thanks very much.

    Jeff

    Friday, September 03, 2010 6:28 PM
  • I remembered seeing this post a while back, and am just beginning to use Access 2010. I've done as you suggest in your answer, I have a text box with the control source as a date field and the format on the control box is short date, and the property of show date picker is set to "for dates" (the only other option shown besides never), but when I run my form and hover over and around the text box, I don't see what you mean by hover icon to click on for the calendar.  Can you think of something else I might be missing?

    "The secret of getting ahead is getting started. The secret of getting started is breaking your complex, overwhelming tasks into small, manageable tasks, and then starting on the first one" - Mark Twain

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did. So throw off the bowlines. Sail away from safe harbor. Catch the trade winds in your sail. Explore. Dream. Discover." - Mark Twain

    Please mark/unmark posts if they answered/unanswered your question as these are helpful to other users of this forum. ~ SuzyQ (aka Terry S.)

    Wednesday, December 22, 2010 3:49 AM
  • If the field gets focus you should definitely see it.  If you click into the field then you will see a little calendar icon appear to the right of your field.  I think the hovering might not work with all operating systems.  I have seen it happen before but it is not currently happening on my computer (Vista). 

    The hovering can actually be kind of annoying because if you have fields too close you might actually click on the calander when you are trying to access something else.

    -Mark-


    Mark Annett www.ISPManSys.com
    Wednesday, December 22, 2010 4:58 AM
  • I clicked in the field also.  All I see is the mask for the date __/__/____ but no icon for the calendar.  At one point I set smart tags to date and I saw an icon, but when I clicked on it outlook opened and that's not what I want, but that's the only way I can see any kind of icon.  It did appear in the right corner, but I don't want outlook and now matter which option I chose, it opened outlook.

    "The secret of getting ahead is getting started. The secret of getting started is breaking your complex, overwhelming tasks into small, manageable tasks, and then starting on the first one" - Mark Twain

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did. So throw off the bowlines. Sail away from safe harbor. Catch the trade winds in your sail. Explore. Dream. Discover." - Mark Twain

    Please mark/unmark posts if they answered/unanswered your question as these are helpful to other users of this forum. ~ SuzyQ (aka Terry S.)

    Thursday, December 23, 2010 1:41 AM
  • Hi SuzyQ,

    I did a google search on "Date Picker not working in 2007" and a lot comes back.  According to the following post, which I have confirmed,

    http://www.tek-tips.com/viewthread.cfm?qid=1563522&page=3

    If you have an input mask, which you have, then the Date Picker doesn't work.  Get rid of your input mask and the date picker should appear.  It stopped working for me as soon as I added an input mask. 

    I haven't looked to see if there is a work around to have both but if there is somebody has probably posted it if you search.  If you do have Date Picker available, most people will use that anyway so you might not need an input mask.

    Under HELP for "input masks" it has the following (the last bullet is the most germain):

    Consider the usage before applying an input mask

    It is usually a good idea to consider how data entry needs might change as your database grows and here are several general questions that you can start with:

    • Will the mask prevent users from entering necessary data? For example, will users ever need to enter phone in a format from another region?
    • Does the mask interfere with the display format settings? For example, switch to Design view and, in the Format property of the field that contains your input mask, type this format string: (&&&) @@@-@@@@. When you view the field in Datasheet view, you see something like this: (425() 5) 55--1212.
    • Do you plan on using the Date Picker on a Date/Time field? If you do, then you cannot apply an input mask to that field.

    By the way, there is a nice little video at http://www.myaccessprogram.com/Videos/DatePicker.html

    which gives a very brief tutorial.

    -Mark-


    Mark Annett www.ISPManSys.com
    • Proposed as answer by Mark Annett Thursday, December 23, 2010 6:30 AM
    Thursday, December 23, 2010 6:29 AM
  • That did it, thanks.  Unfortunately since I didn't start the thread, it's not letting me mark it as an answer.  But maybe one of the moderators will mark you answer.

    "The secret of getting ahead is getting started. The secret of getting started is breaking your complex, overwhelming tasks into small, manageable tasks, and then starting on the first one" - Mark Twain

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did. So throw off the bowlines. Sail away from safe harbor. Catch the trade winds in your sail. Explore. Dream. Discover." - Mark Twain

    Please mark/unmark posts if they answered/unanswered your question as these are helpful to other users of this forum. ~ SuzyQ (aka Terry S.)

    Thursday, December 23, 2010 7:01 AM
  • Mark,

    The moderators have emailed me and said they will not mark you response as answered because it may affect the original poster's question.  I have copied their comments below... If you want me to, I will start another thread so that you can repost your response and I will mark it as answered.  Respond to this thread if you want me to do that and I will.

    Regarding on the following thread, I think there is only one concern for us to mark
    the answer replied by ¡°Mark Annett¡±. This is because the answer is not directly
    targeting the original question and marking it as answer might impact the experience
    of the original poster. If convenient, I would suggest you start a new thread and
    reference the following thread(with your question there) and ask Mark to post in the
    new thread so that you can mark his answer in your own thread. What do you think of
    this?

    "The secret of getting ahead is getting started. The secret of getting started is breaking your complex, overwhelming tasks into small, manageable tasks, and then starting on the first one" - Mark Twain

    "Twenty years from now you will be more disappointed by the things you didn't do than by the ones you did. So throw off the bowlines. Sail away from safe harbor. Catch the trade winds in your sail. Explore. Dream. Discover." - Mark Twain

    Please mark/unmark posts if they answered/unanswered your question as these are helpful to other users of this forum. ~ SuzyQ (aka Terry S.)

    Monday, December 27, 2010 5:07 PM
  • Thanks SuzyQ

    I appreciate you following-up with the moderator.  However, it isn't really important that my answer get credit.  I simply marked it as a potential answer because I saw when I did a google seach that a lot of people had the same problem (I.e. date picker doesn't work if you have an input mask).

    Rather than you making a post and me answering it.  I will just make an informational post.

    -Mark-

     

     


    Mark Annett www.ISPManSys.com
    Monday, December 27, 2010 5:55 PM
  • Hi

    To solve all your problems with the dtpicker in ms access 2010 go to the properties

    then click no checkbox,  this will elimate the checkbox in the date picker.

    To save the record use docmd.save to close the form use Docmd.close 

    otherwise you will get an error message.

     

    Rudolf Elizabeth

     


    rudolfelizabeth
    Monday, November 21, 2011 9:48 PM