473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Wide Calendar w/Switchboard

This question references MS Access Calendar.

I recently downloaded the "Wide Calendar w/Switchboard" database that I found on this forum and it is exactly what I have been searching online for. I have read through most the thread looking for an answer to my question, but have not found one.

I plan on using the 'Training_Events' form to input data into the calendar. Currently the data that is displayed in the calendar comes from the [Title] & [Start Time] fields.

My question is, How do I string the [Title], [Start Time] & [End Time] fields into the calendar? And, if it is possible to input these fields on the calendar, how is that done? Thank you for your reply.

Thank you!

I hope I have made my question clear, I am new to Access but I am able understand
Oct 26 '11 #1
8 2245
ADezii
8,834 Expert 8TB
The actual population of the Calendar Day Blocks occurs within a specific Code segment in the PopulateCalendar() Sub-Routine in the frmCalendar's Code Module. In your case, it should look something like this (Code Lines 6 to 7, 9 to 11):
Expand|Select|Wrap|Line Numbers
  1. '************************************** Code intentionally omitted **************************************
  2. For lngEachDateInRange = lngFirstDateInRange To lngLastDateInRange
  3.   bytEventDayOfMonth = (lngEachDateInRange - lngLastOfPreviousMonth)
  4.   bytBlockCounter = bytEventDayOfMonth + bytBlankBlocksBefore
  5.    If astrCalendarBlocks(bytBlockCounter) = "" Then      'no existing Text in Array
  6.      astrCalendarBlocks(bytBlockCounter) = rstEvents![Title] & " - " & rstEvents![Start Time] & " - " & _
  7.                                            rstEvents![End Time]
  8.    Else
  9.      astrCalendarBlocks(bytBlockCounter) = astrCalendarBlocks(bytBlockCounter) & vbNewLine & _
  10.                                            rstEvents![Title] & " - " & rstEvents![Start Time] & _
  11.                                            " - " & rstEvents![End Time]
  12.    End If
  13. Next lngEachDateInRange
  14. '************************************** Code intentionally omitted **************************************
Oct 29 '11 #2
Thank you for your reply. I modified the code as you suggested and it works really well. No problems at all!! I really appreciate all the time and effort you put into answering these questions.

If you don't mind, I have another related question. Is it possible to insert the [Title] & [Start Time]into let's say October 16, 2011 calendar block, And then insert the [Title] and [END Time] fields into the October 20, 2011 calendar block, without [Start Time] or [End Time] in blocks, 17, 18 and 19?

I thought about using If statements after code lines 6 & 7. Is that possible?
Oct 31 '11 #3
ADezii
8,834 Expert 8TB
@Edward Polite: Off the Top-of-my-Head, the Code would be:
Expand|Select|Wrap|Line Numbers
  1. For lngEachDateInRange = lngFirstDateInRange To lngLastDateInRange
  2.   bytEventDayOfMonth = (lngEachDateInRange - lngLastOfPreviousMonth)
  3.   bytBlockCounter = bytEventDayOfMonth + bytBlankBlocksBefore
  4.    If astrCalendarBlocks(bytBlockCounter) = "" Then      'no existing Text in Array
  5.      Select Case lngEachDateInRange
  6.        Case lngFirstDateInRange         '1st Date in Range, no existing Text
  7.          astrCalendarBlocks(bytBlockCounter) = rstEvents![Title] & " - " & rstEvents![Start Time]
  8.        Case lngLastDateInRange          'Last Date in Range, no existing Text
  9.          astrCalendarBlocks(bytBlockCounter) = rstEvents![Title] & " - " & rstEvents![End Time]
  10.        Case Else                        'Date Between 1st and Last in Range, no existing Text
  11.          astrCalendarBlocks(bytBlockCounter) = rstEvents![Title]
  12.      End Select
  13.    Else
  14.      Select Case lngEachDateInRange
  15.        Case lngFirstDateInRange         '1st Date in Range, existing Text
  16.          astrCalendarBlocks(bytBlockCounter) = astrCalendarBlocks(bytBlockCounter) & vbNewLine & _
  17.                                                rstEvents![Title] & " - " & rstEvents![Start Time]
  18.        Case lngLastDateInRange          'Last Date in Range, existing Text
  19.          astrCalendarBlocks(bytBlockCounter) = astrCalendarBlocks(bytBlockCounter) & vbNewLine & _
  20.                                                rstEvents![Title] & " - " & rstEvents![End Time]
  21.        Case Else                        'Date Between 1st and Last in Range, existing Text
  22.          astrCalendarBlocks(bytBlockCounter) = astrCalendarBlocks(bytBlockCounter) & vbNewLine & _
  23.                                                rstEvents![Title]
  24.      End Select
  25.    End If
  26. Next lngEachDateInRange
P.S. - I'm sure that the Code can be condensed in some manner.
Oct 31 '11 #4
Good Morning ADezii,

Wow! Off the top of your head, your a blessing man! I will get to work on this and let you know how things turn out. Pointing out the calendar population section of the code has been insightful and has made understanding the db and its functions a lot easier.

Thank you!
Oct 31 '11 #5
Good Morning ADezii,

I am finished!! The code worked perfectly! Maybe the code can be condensed, but right now the coding is fine.

Hats off to all MS Access Experts, what a wonderful group of people you all are!!

Thank you!!!
Oct 31 '11 #6
ADezii
8,834 Expert 8TB
@Edward Polite:
Glad you are enjoying the Ms Access Calendar. This Application has been extremely popular over the years, and I have made many modifications to it, usually adapting it to specific needs. I wish to again state for the Record that I am not the Original Author of this Concept, but have been given by him full permission to modify and distribute it in any manner I see fit. I also would like to state that NeoPa has also been very instrumental in providing the Final Version of the Code for this Calendar. His insights are invaluable, always welcome, and greatly appreciated.
Oct 31 '11 #7
I agree. Kudos to the original author and NeoPa as well!
Oct 31 '11 #8
NeoPa
32,556 Expert Mod 16PB
Well there's my first question answered. It's not just your name :-D
Oct 31 '11 #9

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

Similar topics

13
by: Mark | last post by:
I am looking for a switchboard creator alternative for my MDB. Can anyone help me? Thanks for your help, Mark
2
by: Terry | last post by:
I have created a switchboard, created using Access 2000. If I put the mouse anywhere on the form, outside of the checkboxes and scroll the wheel backwards, I get the following error. Run-Time...
4
by: Rampar | last post by:
I did some customizing on my switchboard (changing colors and adding graphics) to make it more appealing. I tried to add another item, and it told me that 8 was the limit. Fine. I deleted one...
2
by: Neil Greenough | last post by:
I am trying to create a Switchboard using the Switchboard Manager in MS Access 2000. I have managed to get the table created for the switchboard, however it hasn't actually created the form. ...
1
by: jimwlee | last post by:
Hi all, I mistakenly deleted my switchboard on the Object Forms view. I recreated it again with the database utility, but the switchboard isn't showing up in the forms view. Any ideas? Thanks in...
3
by: Jarod | last post by:
Hey Is there a way to make calendar "roll back" so when the user don't need it should hide a lot of dates. Or maybe some roll back... I want to have calendar in gridView but takes so much space...
1
by: mplus_2000 | last post by:
I have recently inherited a database. The switchboard (and other forms) displays the name of the database on it (top, center). Currently the name that appears is Reviews. There are plans to roll...
3
by: sorry im noob | last post by:
Yeah, the name says it all. So I have a switchboard that auto pops up and I need my users to be able to input a specific date. I tried to use the built in Calendar Control 11.0 but I seem to be a...
340
by: MyWaterloo | last post by:
This thread has been closed as it has gotten just too big. If you have any questions about the application discussed in this thread please start a new thread in MS Access by clicking on the Start...
2
by: Earl Anderson | last post by:
In Acc2003, I have a situation in which I have a main switchboard and upon pressing one of its buttons , takes the user to another sub hierarchical switchboard. Pressing one of these buttons could...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.