Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Manchester, Gtr Manchester, England
    Thanked 0 Times in 0 Posts

    Calendar Hide (2000)

    Hi, I have an active x calendar control that is hidden on my form and becomes visible on a button click. When I have used it to populated a date field with a date I need it to become not visible. I have wrestled with lostfocus etc and can't seem to get it working. Any tips are welcome.

    Thanks Darren.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Calendar Hide (2000)

    I'd use the After Update event of the calendar. This is not listed in the Event tab of the Properties window, but you can still use it.
    (In the form's VBA module, select the calendar from the Object dropdown in the upper left, then select AfterUpdate from the Procedure dropdown in the upper right)
    You must set focus to another control before hiding the calendar.

    For example:

    Private Sub Calendar0_AfterUpdate()
    ' Populate text box
    Me.Text2 = Me.Calendar0
    ' Set focus to text box
    ' Hide calendar
    Me.Calendar0.Visible = False
    End Sub

Posting Permissions

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