Originally posted by mshmyob
MS Access Calendar
Collapse
This topic is closed.
X
X
-
Well, I have a database (in access 2007 format and am trying to import the calander into it.
I am simply going to use the calander for weather stuff (the database is for a small construction firm and we would like to have a record of the weather so if a client calls and asks why we havent concreted their driveway, we can say it has been raining from 8/8/08 to 12/8/08 etc)
Anyway, when i try to copy and paste the calander files, or drag the calander files or even import them, I get the error
"Error in populateCalande r()"
"Type Mismatch"
I can open the calander in its native format (2003) and dont have any dramas. The calander is fantastic though.
I have uploaded the database if anyone can help me out it would be greatly appreciated
http://rapidshare.com/files/138450652/SCG_Database_2. 0.accdb.html
Thanks
aeromonComment
-
OK I am downloading it. Next time attach it to your message here.
I will get back to you.
cheers,
Originally posted by aeromonWell, I have a database (in access 2007 format and am trying to import the calander into it.
I am simply going to use the calander for weather stuff (the database is for a small construction firm and we would like to have a record of the weather so if a client calls and asks why we havent concreted their driveway, we can say it has been raining from 8/8/08 to 12/8/08 etc)
Anyway, when i try to copy and paste the calander files, or drag the calander files or even import them, I get the error
"Error in populateCalande r()"
"Type Mismatch"
I can open the calander in its native format (2003) and dont have any dramas. The calander is fantastic though.
I have uploaded the database if anyone can help me out it would be greatly appreciated
http://rapidshare.com/files/138450652/SCG_Database_2. 0.accdb.html
Thanks
aeromonComment
-
Originally posted by mshmyobOK I am downloading it. Next time attach it to your message here.
I will get back to you.
cheers,Comment
-
OK. Easy fix.
Access 2007 uses DAO by default again but AC200-2002 uses ADO by default.
You therefore need to look for the following line under the PopulateCalenda r routine
[code=vb]
Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As Recordset
[/code]
and change it to
[code=vb]
Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As DAO.Recordset
[/code]
Or of course change your Access 2007 settings to use ADO again.
cheers,
Originally posted by ADeziiThanks mshyob, I'm dead in the water on this one. When you find the answer to the problem, and I know you will, kindly post it here since this little Calendar Application seems to be fairly popular, and I would like to get a handle on any potential problems which may arise. Thanks.Comment
-
Originally posted by mshmyobOK. Easy fix.
Access 2007 uses DAO by default again but AC200-2002 uses ADO by default.
You therefore need to look for the following line under the PopulateCalenda r routine
[code=vb]
Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As Recordset
[/code]
and change it to
[code=vb]
Dim astrCalendarBlo cks(1 To 42) As String, db As Database, rstEvents As DAO.Recordset
[/code]
Or of course change your Access 2007 settings to use ADO again.
cheers,Comment
-
Originally posted by typhooAdezii
im absolutely over the moon with this, you did it so quickly aswell!! thanks very very very very much!- Hello typhoo, I noticed that the Horizontal Scroll Bar is visible in lstEvents. You can eliminate this by setting the following properties in lstEvents:
Code:Column Widths: 0";0.5";6.25" Width: 7"
- You can also set the Column Heads of lstEvents to: Yes
Comment
- Hello typhoo, I noticed that the Horizontal Scroll Bar is visible in lstEvents. You can eliminate this by setting the following properties in lstEvents:
-
Thanks for all the help on this. I have vacation planner started and this is going to tie in great with what I started!!
SteveComment
-
OK
I have rebuilt the calendar in my db. What I want the Event table to do is simply display the employee, type of vacation (event) and the range of the employee's vacation.
I have looked at the code on planner calendar but not sure why you put the tblTempEvent in place?
SteveComment
-
Originally posted by SteveSheltonOK
I have rebuilt the calendar in my db. What I want the Event table to do is simply display the employee, type of vacation (event) and the range of the employee's vacation.
I have looked at the code on planner calendar but not sure why you put the tblTempEvent in place?
SteveComment
-
Originally posted by SteveSheltonOK
I have rebuilt the calendar in my db. What I want the Event table to do is simply display the employee, type of vacation (event) and the range of the employee's vacation.
I have looked at the code on planner calendar but not sure why you put the tblTempEvent in place?
Steve
If Event 1 was scheduled between 1/1/2008 and 1/5/2008, it would have to be expanded to 5 Days, 5 Records, so that they can be represent ed in the Calendar:
Code:Event 1 - 1/1/2008 Event 1 - 1/2/2008 Event 1 - 1/3/2008 Event 1 - 1/4/2008 Event 1 - 1/5/2008
Comment
-
That makes since. I have sent you the shell of the database. I have just started on it so some of of it is crude. Took out all the forms except the calendar.
Thanks again.
SteveComment
-
Originally posted by SteveSheltonThat makes since. I have sent you the shell of the database. I have just started on it so some of of it is crude. Took out all the forms except the calendar.
Thanks again.
Steve- You must redefine the Variable strSQL2 in the PopulateEventsL ist() Sub-Routine, as in:
Code:Private Sub PopulateEventsList(ctlDayBlock As Control) On Error GoTo Err_PopulateEventsList Dim strSQL2 As String strSQL2 = "SELECT tblEventTemp.Owner, tblEventTemp.Event, tblEventTemp.EventID " & _ "FROM tblEventTemp WHERE tblEventTemp.Date = " & _ ctlDayBlock.Tag & " ORDER BY tblEventTemp.Date;" lstEvents.RowSource = strSQL2 lblEventsOnDate.Caption = Format(ctlDayBlock.Tag, "m-dd-yyyy") lstEvents.Visible = True lblEventsOnDate.Visible = True Exit_PopulateEventsList: Exit Sub Err_PopulateEventsList: MsgBox Err.Description, vbExclamation, "Error in PopulateEventsList()" Resume Exit_PopulateEventsList End Sub
- Change the Column Widths Property in the Events List Box, since it will now be used display the Owner and Event. Use settings similar to 2;1;0.
Comment
- You must redefine the Variable strSQL2 in the PopulateEventsL ist() Sub-Routine, as in:
-
Thanks that worked.
I am trying to prefill on one form before the calendar to set the vacation up. On the form I have a combo box that list the employees. I have a querry that list the employees from another table. I have been reading and found this code but I can not get it to prefill the the rest of the information about the employee I have tried to adapt it for mine not much luck.
Code:Public Sub MatchCombo(frmData As Form) Dim Rst As DAO.Recordset Dim strMark As String Dim strSql As String On Error GoTo rBookmark_Error Set Rst = frmData.RecordsetClone Rst.FindFirst "[Emploee] = " & frmData!Combo8 strMark = Rst.Bookmark frmData.Bookmark = strMark Set Rst = Nothing exit_Bookmark: Exit Sub rBookmark_Error: MsgBox Err.Number & vbCrLf & Err.Description Resume exit_Bookmark End Sub
Last edited by Stewart Ross; Nov 21 '08, 10:47 AM. Reason: Please use the code tags provided - enhances readability of your postComment
Comment