Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Forms and Calendars (Access 2003)

    I wonder if anyone out there knows the easiest way to connect a bound form date field to (the same) form calendar so that when the user clicks on a date (past, present or future), this date is placed in the date field and therefore, back into the table. Thanks in advance for any info.
    Bob W.

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

    Re: Forms and Calendars (Access 2003)

    Simply set the Control Source property of the calendar control to the date field.

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Forms and Calendars (Access 2003)

    Thanks Hans for your solution. I tried it on a form with a Date field text box. However, after selecting a date (say, March 13, 2007), the last date in the box doesn't change to the this new one. I'm sure there's some Event Procedure I have to write so that when the date is changed on the calendar, it automatically changes in the date text box; right now I must click on the date box to invoke the change. Also, this change must be reflected back in the table. Any ideas or code would be appreciated. Thanks again.
    Regards
    Bob W

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

    Re: Forms and Calendars (Access 2003)

    Normally, the date will be updated the moment the calendar control loses focus, i.e. when you tab to another control etc. If you want the date to be updated immediately, you can use the After Update event:

    Private Sub Calendar0_AfterUpdate()
    Me.Refresh
    End Sub

    where Calendar0 is the name of the calendar control. But please note that this disables the possibility to undo the change.

Posting Permissions

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