Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calendar Option on a Date field? (Access 2000)

    Is there a way to have a calendar option on a date field? It other words, when something is purchased per say for the company, can I create a drop-down list to contain a calander- or - an active X control to take my click as a response to fill in a field with the purchase date of that item as a choice. I can add an Active X calendar, but clicking on it doesn't fill in an actual field. Is there a way to do this? I know I could make a dummy table with a whole years worth of dates and then use it as a look up field in a drop-down box BUT thats a long list to pick from. Looking for possibly a Picture Calendar like Active X to click on and have that fill in a corresponding date field possibly, or a drop down box that a calendar might appear in. Any other suggestions welcomed...Any help very much appreciated.
    Thank you,
    NMPadgett
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    I think I read somewhere the other day that there are 3 examples of this in the Northwind database, I don't have time to look right now but if I find anything I will let you know later.

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Calendar Option on a Date field? (Access 2000)

    It sounds like you want the DateTime Picker control, which is a kind of dropdown calendar control. Take a look at the attachment to <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=52122&page=& view=&sb=&o=&vc=1#Post52122>this post</A> It has sample database using DateTime Picker controls to populate form fields.
    Charlotte

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    I'm mystified as to why an Active X calendar control doesn't fill in a field for you - we use the standard Access one that comes with 97 or 2000 regularly to do that. In most cases it requires you to double click the field, but that can be changed. What am I missing?
    Wendell

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    Charlotte,

    Thank you for all your help. You did it again. Always my Heroine. <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    Wendall,

    Usually when I write in, I have the concept of the project, just not the steps. When I asked the question, I asked for advice that could include steps . I did not have anything in the works to question. Some of us are not already aces at this, just climbers to that respected position. But thank you for your input, I accept any and all, but can always use them with explanations...
    NMP
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    Sorry - I'm not on the forum that much, and I presumed you had tried the standard Calendar Control and had found it to be lacking. Hopefully I can be a bit more helpful.

    The date controls that Charlotte referred to in her post require the use of a separate OCX file named MSCOMCT2.OCX, while the Microsoft Calendar control usually is installed as a normal part of Access 2K, and I'm always looking for ways to make the standard stuff work if I can. So I would suggest the following (presuming that you are concerned about the space taken up by the control on the form - the standard one takes quite a bit):

    1 - Put VBA in the On Enter event of the text box where the date is to be stored, set a default date if that is appropriate, and open a pop-up form that is modal and contains a Calendar Control with the default date selected.
    2 - Allow the user to accept the default date, or to enter a new date if appropriate, and then click a button to close the pop-up form.
    3 - When the Close button on pop-up form is clicked, set the date in the text box to the value selected on the Calendar Control (after doing some validation to make sure a reasonable date has been selected), close the form, and move focus to the next control on the data entry form.

    Please note however, that Active-X controls can cause trouble if they are used in databases that are used by or distributed to a number of PCs. The problem stems from the fact that different versions of controls are distributed with different products - Office 2K Developer had a different MSCOMCTL32.OCX than did the Professional version (there are at least 4 that I know of) - and forms developed with one may not work with another. We actually ended up developing a database launcher that checks for that and other consistency issues on a local PC when a database is opened in order to resolve such issues. If you have only a handful of users, you shouldn't find it a big issue though.

    Hope this is userful.
    Wendell

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    Wendall,

    Thank you for your more detailed response. I appreciate you taking the time to spell it out for me. <img src=/S/read.gif border=0 alt=read width=19 height=33>
    I will give this a run and let you know how it goes, but just had to take a moment out and give you a large thank you...
    NMPadgett <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  9. #9
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calendar Option on a Date field? (Access 2000)

    you might want to look at this post by
    <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=15613&Search =true&Forum=All_Forums&Words=MarkJ&Match=Username& Searchpage=0&Limit=25&Old=allposts&Main=15565>Mark J</A>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •