Results 1 to 6 of 6
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Show/Hide Calendar control (2003 SP-2)

    I am considering using Calendar Control 11.0 in one of my forms, but it takes up a good deal of real estate. I've never used this control, so I'm not clear on how it works. I presume I can make it not visible in properties and then make it visible from a command button, but there is no "close" button on the control itself. Bottom line, how do I (command button code) open the control and close it?
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Show/Hide Calendar control (2003 SP-2)

    You don't "open" or "close" the calendar control, you set its Visible property to True or False. See <post:=441,897>post 441,897</post:> for a demo.

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Show/Hide Calendar control (2003 SP-2)

    Hans:

    Thanks friend; I'll look further into that thread. My first reaction, however, is that a a combo box won't work for me when duplicating records. If I recall correctly, duplicating records where a combo box is used to select a value results in no value entered for the duplicated records. In any case, I need to look into this further and you have graciously provided the right direction to start me on my way. Thanks!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Show/Hide Calendar control (2003 SP-2)

    That depends on whether the combo box is bound to a field or not.
    But it will work with a text box instead of a combo box as well, just change the line

    Private ctlCaller As ComboBox

    to

    Private ctlCaller As TextBox

    The combo box was only used to give the user a visible clue that clicking in the control would cause something to dropdown.

  5. #5
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Show/Hide Calendar control (2003 SP-2)

    . . .processing. . . <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  6. #6
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Show/Hide Calendar control (2003 SP-2)

    Excellent solution!
    I used the "On Mouse Down" event of the text box containing the date entry. The form continues to be filled out in the same manner as before (tabbing through the entries), but now the calendar is available by simply clicking on the date entry when a specific day is in question. Simple, yet elegant. Thanks Hans!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

Posting Permissions

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