Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    calendar control (xp)

    Hi all, i would like to use a calendar control as a filter for a subform. I want to select a date (using the calendar) and have the records from that date only shown on the subform. Can this be done? thanks, Van <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

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

    Re: calendar control (xp)

    Set the Link Master Fields property of the subform to the name of the calendar control, and the Link Child Fields property to the name of the date field to be filtered on. Note: you will have to enter these properties manually, the property bulder (the ... button) won't work here.
    Requery the subform in the After Update event of the calendar control:

    Private Sub calCalendar_AfterUpdate()
    Me.sbfSubform.Requery
    End Sub

    where calCalendar is the name of the calendar control and sbfSubform is the name of the subform as a control on the main form (this is not necessarily the same as the name of the subform in the database window).

  3. #3
    Star Lounger
    Join Date
    Nov 2002
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: calendar control (xp)

    Thanks heaps Hans, that's worked perfectly. regards, Van <img src=/S/aussie.gif border=0 alt=aussie width=21 height=22>

Posting Permissions

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