Originally posted by msquared
calendar in Access
Collapse
This topic is closed.
X
X
-
-
Thanks a million Mary, you have no idea how much I appreciate your response, and subsequent solution to the problem. If you were in front of me right now, I'd kiss ya! (LOL). P.S. - I'll notify the Original Author since I'm sure that he will be interested also. Thanks again.Originally posted by msquaredOK the problem is in the date format.
Looking at the following code...
[code=vb]
Private Sub PopulateCalenda r()
On Error GoTo Err_PopulateCal endar
Dim strFirstOfMonth As String, bytFirstWeekday OfMonth As Byte, bytBlockCounter As Byte
Dim bytBlockDayOfMo nth As Byte, lngBlockDate As Long, ctlDayBlock As Control
Dim bytDaysInMonth As Byte, bytEventDayOfMo nth As Byte, lngFirstOfMonth As Long
Dim lngLastOfMonth As Long, lngFirstOfNextM onth As Long, lngLastOfPrevio usMonth As Long
Dim lngEventDate As Long, bytBlankBlocksB efore As Byte, bytBlankBlocksA fter As Byte
Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As Recordset
Dim strSelectEvents As String, strEvent As String, strPlatoons As String
Dim intMonth As Integer, intYear As Integer, lngSystemDate As Long 'CFB added 1-25-08
Dim ctlSystemDateBl ock As Control, blnSystemDateIs Shown As Boolean 'CFB added 1-25-08
lngSystemDate = Date 'CFB added 1-25-08
intMonth = objCurrentDate. Month
intYear = objCurrentDate. Year
lstEvents.Visib le = False
lblEventsOnDate .Visible = False
lblMonth.Captio n = MonthAndYear(in tMonth, intYear)
strFirstOfMonth = Str(intMonth) & "/1/" & Str(intYear)
bytFirstWeekday OfMonth = Weekday(strFirs tOfMonth)
[/code]
strFirstOfMonth value (for today) is "2/1/2008" which is fine for US dates and will return the correct Weekday. However under European dates this is being translated as Jan 2nd. Therefore the wrong Weekday number is being returned (4 instead of 6) for the start of the month.
The following would work for European standards but not for US.
strFirstOfMonth = "1/" & Str(intMonth) & "/" & Str(intYear)
I would suggest trying the following instead as I think it is consistent accross the board.
strFirstOfMonth = Str(intYear) & "/" & Str(intMonth) & "/1"Comment
-
She sure is. Thanks for sticking with it ADezii. You're a star.Originally posted by ADeziiThat Mary's something, isn't she? For both of us, I'm happy your issue got resolved.Comment
-
Hi ADezii,
Do you still have this file? I've been asked to do this too, but had no idea it could be done in Access.
Thanks!
Originally posted by ADeziiIf you are interested, I have a fully functional Calendar created entirely within Access via 1 Table, 2 Forms, 1 Class, and 1 Standard Code Module. It was used as a simple Appointment Calendar for a certain Unit within the Philadelphia Fire Department. It is quite simplistic and easily adaptable. Let me know if you are interested.Comment
-
Never mind, i found the link elsewhere on the page.
Thanks!
Originally posted by truthloverHi ADezii,
Do you still have this file? I've been asked to do this too, but had no idea it could be done in Access.
Thanks!Comment
-
Access Calendar Example
I've built an Access app for a small music school business to register students and produce invoices. I used vba to view and select classes scheduled in Outlook Calendar so that registration records are created. They are adding a second computer so two people can schedule and register. No problem sharing the Access data, but sharing a calendar in Outlook requires Exchange.If you are interested, I have a fully functional Calendar created entirely within Access via 1 Table, 2 Forms, 1 Class, and 1 Standard Code Module. It was used as a simple Appointment Calendar for a certain Unit within the Philadelphia Fire Department. It is quite simplistic and easily adaptable. Let me know if you are interested.
Could you please send your Fire Dept app for an example? Thanks so much!
CharleneComment
-
Hello Charlene, I'm sending you a better example of the Calendar since the Fire department Version is proprietary and would not be of much use to you. This Calendar appears to be very popular and I have retrofitted in many times to do things that it was never actually designed to do. Any questions, please feel free to ask.I've built an Access app for a small music school business to register students and produce invoices. I used vba to view and select classes scheduled in Outlook Calendar so that registration records are created. They are adding a second computer so two people can schedule and register. No problem sharing the Access data, but sharing a calendar in Outlook requires Exchange.
Could you please send your Fire Dept app for an example? Thanks so much!
CharleneComment
-
Thank you
Thank you! This makes sense and will save me a lot of time.Hello Charlene, I'm sending you a better example of the Calendar since the Fire department Version is proprietary and would not be of much use to you. This Calendar appears to be very popular and I have retrofitted in many times to do things that it was never actually designed to do. Any questions, please feel free to ask.Comment
-
Comment
-
Comment
-
I need to set up a nice calendar in access for vaca scheduling. We do this now via excel, however we can't report out of it.
So I need to set up a table with tech's, shifts, company vaca days, requested days off, and covering people for those requests.
Does this give a little insight? I would like to have the front end to be simple where a person can look at the month and just put their name in for vaca. Then a person sees that and they cover it with their name. In the back end, as long as the data is there, I can pull a report to show who has taken vaca, who covered and how many people still need to find coverage.
Thanks!
DavidComment
-
Believe it or not, I'm actually in Aruba right now Vacationing, but when I return home I'll see if I can come up with anything for you.I need to set up a nice calendar in access for vaca scheduling. We do this now via excel, however we can't report out of it.
So I need to set up a table with tech's, shifts, company vaca days, requested days off, and covering people for those requests.
Does this give a little insight? I would like to have the front end to be simple where a person can look at the month and just put their name in for vaca. Then a person sees that and they cover it with their name. In the back end, as long as the data is there, I can pull a report to show who has taken vaca, who covered and how many people still need to find coverage.
Thanks!
DavidComment
-
Comment