By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,572 Members | 963 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,572 IT Pros & Developers. It's quick & easy.

MS Access Calendar Query Source add filter

P: 89
I am using the MS Access Calendar in Access 2013, Windows 8.

Currently I am using 4 calendar forms with the data source supplied by 4 different tables.

Table 1 = Holidays
I use the form to print a blank calendar (blank = does not include scheduling info). Holidays are treated as part of a blank calendar like you would buy for your wall at home.

Table 2 = Events
No printing needed but I will be attaching a form to the blocks in this calendar.

Table 3 = Courses (Education Classes)
No printing needed but I will be attaching a form to the blocks in this calendar.

The forms are VERY different for Events and Courses. I am unaware of a way to attach 2 forms to one block so I used 2 calendar forms. Additionally, I am not sure I would want to. It might make data entry more confusing.

Table 4 = Tables 1, 2, and 3 combined for a complete calendar view. Mostly used for printing.

I did it this way so I could use it now and I am working on the elimination of multiple tables. I originally could not get the calendar form to accept a Query as its source. This has magically ceased being an issue (I think). The end result will be a Query holding the info needed to feed any form with a field (Calendar Category) specifying Event, Course or Holiday.

I am hoping I can add a filter to the calendar form to only display information in the Query where, for example, Calendar Category = Event.

Or possibly use one calendar and have a control to choose between multiple views.

My question is: How can I filter the displayed information on the calendar form?

Thanks for Looking...Have a Thrilling Thursday!
Dec 12 '13 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 8,632
The Access Calendar is not your 'Traditional' Form in that it is 'Bound' to a Data Source and has Controls 'Bound' to Control Sources. The only mechanism I can see for this scenario is to create a Modular Level Variable to hold your SQL Statement that will be the driving force for the Calendar. Depending on selecting a certain Criteria, say an Event Type from a Drop Down Menu, this Variable would be assigned a String representing your SQL. The Calendar Form would then be opened, creating the Recordset derived from the dynamically created SQL Statement in PopulateCalendar().
Dec 13 '13 #2

P: 89
This calendar is my first and only exposure to using code.

I have done simple things like changing the source table, changing all the fore and background colors, stopping blinking labels, and making the week start on Monday's.

While this seems like the answer I was looking for based on my limited understanding of what you explained, this is over my head.

I will file this answer and come back to it when I know how to attempt it.

Thank you very much.
Dec 13 '13 #3

Expert 5K+
P: 8,632
You are quite welcome. Perhaps a simple Demo will do the trick for you so you can see first hand what is happening. Let me see what I can come up with. You picked a daunting Task given the fact that you have limited exposure to writing Code.
Dec 13 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.