• Calendar Option on a Date field? (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Calendar Option on a Date field? (Access 2000)

    Author
    Topic
    #360375

    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

    Viewing 2 reply threads
    Author
    Replies
    • #542570

      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

    • #542573

      It sounds like you want the DateTime Picker control, which is a kind of dropdown calendar control. Take a look at the attachment to this post It has sample database using DateTime Picker controls to populate form fields.

    • #542630

      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?

      • #542632

        Charlotte,

        Thank you for all your help. You did it again. Always my Heroine. bravo

      • #542634

        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

        • #542662

          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.

          • #542891

            Wendall,

            Thank you for your more detailed response. I appreciate you taking the time to spell it out for me. read
            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 grin

    Viewing 2 reply threads
    Reply To: Calendar Option on a Date field? (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: