Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Selecting Date from Calendar Control (Access 2002, SP3)

    I have a field named DisciplineDate on a form screen and when a user double clicks the field the following code displays a calendar for them to use in selecting the date: =PopupCalendar(Screen.ActiveControl).
    There is code built into the after update for the DisciplineDate field to print a report. The after update code kicks in fine if the date is typed but if the date is selected from the calendar the after update event does not occur. Is there anything I can do other than removing the calendar and forcing the user to manually enter the date to get the field to activate the after update event?
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

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

    Re: Selecting Date from Calendar Control (Access 2002, SP3)

    Instead of having =PopupCalendar(Screen.ActiveControl) in the On Dbl Click event, select [Event Procedure] from the dropdown list, and create code:

    Private Sub DisciplineDate_DblClick(Cancel As Integer)
    Call PopupCalendar(Screen.ActiveControl)
    Call DisciplineDate_AfterUpdate
    End Sub

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Selecting Date from Calendar Control (Access 2002, SP3)

    That worked perfectly. Thank you so very much.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

Posting Permissions

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