Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Filtering Multischedules on viewing calendar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Filtering Multischedules on viewing calendar

 Post Reply Post Reply
Author
Message
belkaze View Drop Down
Groupie
Groupie
Avatar

Joined: 10 September 2010
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote belkaze Quote  Post ReplyReply Direct Link To This Post Topic: Filtering Multischedules on viewing calendar
    Posted: 10 September 2010 at 9:22pm

Hi I would like to know how to filter the view of multishedules on the Calendar. For example using the MultischedulesAccessSample14, I've managed to setup 3 user schedules. How do you filter to show one on the calendar when using a button as an example?


 
Back to Top
belkaze View Drop Down
Groupie
Groupie
Avatar

Joined: 10 September 2010
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote belkaze Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2010 at 4:25am
Let me clarify, you have the calendar control showing the following multiple schedules
 
 
How do you filter the view with a button control event, when clicked would show just Person1 on the calendar. Both Person1 and Person2 events are stored in the same dataprovider location as in this case MSACCESS
Back to Top
Access2007 View Drop Down
Groupie
Groupie
Avatar

Joined: 21 April 2009
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote Access2007 Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2010 at 10:43am
This is probably not the right way to do it, it doesn't filter the columns, but just removes the appointments from the columns that you don't want to see.
 
1. I changed Changed the name of the event table to events.
2. Used a combo box to filter for the person that I wanted to see. In the afterupdate event of the combo box, I had the following code to create the event query:
On Error Resume Next
Dim SchedId As Double
SchedId = Me.Combo100
 Dim db As Database
Dim strSQL As String
Dim strQueryName As String
Dim qdf As QueryDef
Set db = CurrentDb
strQueryName = "Event"
db.QueryDefs.Delete "event"
    Set qdf = db.CreateQueryDef("event")
   strSQL = "select * from events where scheduleid = " & SchedId
    qdf.SQL = strSQL
RefreshCalendarFromDB
   Me.CalendarControl1.Populate
   Me.CalendarControl1.RedrawControl
 Set qdf = Nothing
db.Close
Set db = Nothing
-----------------
Have you been able to use your own Access Form to create appointments with the AccessSampleMinimal14 sample database?
 
 
Windows 7 Pro 64
Access 2007
Calendar 15.3.1
Back to Top
belkaze View Drop Down
Groupie
Groupie
Avatar

Joined: 10 September 2010
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote belkaze Quote  Post ReplyReply Direct Link To This Post Posted: 22 September 2010 at 4:16am
Managed to sort the filtering of schedules on the Calendar control as well as the modifications of the Edit Appointment form
Back to Top
belkaze View Drop Down
Groupie
Groupie
Avatar

Joined: 10 September 2010
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote belkaze Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2010 at 10:27pm

Best way was to remove and re-add the schedules to the calendar control without changing the records in the Schedule table. So basically repopulating the Calendar control with the selected schedule

Back to Top
belkaze View Drop Down
Groupie
Groupie
Avatar

Joined: 10 September 2010
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote belkaze Quote  Post ReplyReply Direct Link To This Post Posted: 15 October 2010 at 4:21am
I have been able to use my own Access Form to create appointments using the  AccessSampleMinimal14 sample database
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.