Onload error using Runtime

coolcatkelso

Registered User.
Local time
Today, 21:39
Joined
Jan 5, 2009
Messages
279
Hiya guys

Just testing my DB now and noticed I had a problem in the Calendar

I click on Calendar and get Onload error - Object not found

DB was created with Access 2007 - I installed Access Runtime 2007 on the other pc and found that error?

Its the CalendarControl but don't know what the fix is?

Cheers
________
HONDA C70
 
Last edited:
Hiya

I did a search and found it in C:\Program Files\MSECache\AccessRT\AccessRT.Cab
________
IMMVP REPLAY
 
Last edited:
Hiya m8

Yip also got mscal.ocx in Windows\system32 I also done Regsrv32 to make sure and its registered

The exact error message is - Object Not Found

The LinkMasterFields property setting has procude this error "Object or Class does not support the set of events"

The form will load but doesn't load the Calendar parts

I downloaded AccessRuntime2007 again, and still get the same error.. There is another version called -
Microsoft Office Access Runtime and Data Connectivity 2007

On the mswebsite but havne't tried that yet

Here is the Class from the form if that helps - MSComCtl2.MonthView.2
________
Kitchen Measures
 
Last edited:
This is one of the reasons why I avoid using ActiveX controls like the Plague. They cause more trouble than they are worth.
 
Hiya Bob

I did use another one before, the other one in Access but when I went to Windows 7 from XP that didn't work anymore so I changed it..

You got a fix?

I've tried the DAO350.Dll and Reg'd it, but still same error

or is there another one I can get working?
________
LOVE ADVICE FORUMS
 
Last edited:
Cheers Bob

Looks good and well built but don't think it would work for me

I managed to get MSCAL.Calendar.7 working with Runtime but not the MonthView one.. The code I have is asking monthview to Highlight / Circle a date if there is an appointment been added, and the MSCAL.Calendar.7 doesn't support this feature, not sure if that demo one would?

I could take that part out and use the MSCAL.Calendar.7 but think I would make a mess and just get errors lol

Heres the code, tell me what you think

Code:
Option Compare Database
Private date1 As Date, date2 As Date
Private selDate As Date
Private boolRedraw As Boolean
Private db1 As New ADODB.Connection
Private Sub Command10_Click()
    Me.Requery
End Sub

Private Sub Form_AfterDelConfirm(Status As Integer)
Me.Requery
UpdateDay fldDate
End Sub
Private Sub Form_AfterUpdate()
UpdateDay fldDate
End Sub
 
Private Sub Form_Load()
Me.MonthView0.Value = Now
MonthView0_DateClick (Now)
Me.FilterOn = True
Me.TimerInterval = 1
End Sub

Private Sub Form_Timer()
'date1 = Empty
'date2 = Empty
 Me.fldDate.SetFocus
 UpdateDayBold
 'boolRedraw = False
 Me.TimerInterval = 0
End Sub
 
 
 

Private Sub lstEvents_Click()
On Error GoTo Err_PopulateEventsList
Dim strSQL2 As String
strSQL2 = "SELECT Qry_CalData.DateA,Qry_CalData.LastName,Qry_CalData.TimeFrom,Qry_CalData.TimeTo,Qry_CalData.ID "
strSQL2 = strSQL2 & "FROM Qry_CalData "
strSQL2 = strSQL2 & "WHERE (((Qry_CalData.DateA)=" & ctlDayBlock.Tag & "));"

lstEvents.RowSource = strSQL2
lblEventsOnDate.Caption = Format(ctlDayBlock.Tag, "mm-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
Public Sub MonthView0_DateClick(ByVal DateClicked As Date)
        Me.fldDate.SetFocus
        Me.Filter = "fldDate=#" & Format(DateClicked, "short date") & "#"
        Me.Requery
        selDate = Format(Me.MonthView0.Value, "short date")
Debug.Print ("date click " & boolRedraw)
End Sub
Public Sub MonthView0_SelChange(ByVal StartDate As Date, ByVal EndDate As Date, Cancel As Boolean)
'UpdateDayBold
Me.fldDate.SetFocus
If selDate <> Format(Me.MonthView0.Value, "short date") Then
    MonthView0_DateClick Format(Me.MonthView0.Value, "short date")
End If
Me.TimerInterval = 1
End Sub

Private Sub UpdateDayBold()
If Not boolRedraw Then
    boolRedraw = True
    Dim dt1 As Date, dt2 As Date
    dt1 = Format(Me.MonthView0.VisibleDays(1))
    Dim x1 As Integer
    x1 = 110
    On Error Resume Next
    dt2 = Format(Me.MonthView0.VisibleDays(x1), "short date")
    While Err.Number <> 0
        Err.Clear
        x1 = x1 - 1
        dt2 = Format(Me.MonthView0.VisibleDays(x1), "short date")
        DoEvents
    Wend
    On Error GoTo 0
    If date1 = dt1 And date2 = dt2 Then
        boolRedraw = False
        Exit Sub
    End If
    date1 = dt1
    date2 = dt2
    'Me.MonthView0.Visible = False
    'Dim db1 As New ADODB.Connection
    Set db1 = CurrentProject.Connection
    For dt = dt1 To dt2
        UpdateDay CDate(dt)
    Next
    'Err.Clear
    'Me.Requery
    'Me.MonthView0.Visible = True
    boolRedraw = False
    'MonthView0.Locked = False
End If
End Sub
Private Sub UpdateDay(dt As Date)
        Dim view1 As New ADODB.Recordset
        view1.Open "select fldDate from [Table1] where fldDate=#" & Format(dt, "short date") & "#", db1, adOpenKeyset, adLockBatchOptimistic, ADODB.adCmdText
        On Error Resume Next
        Me.MonthView0.DayBold(dt) = Not view1.EOF
        Debug.Print Format(dt, "Short Date") & " : " & Err.Description
        Err.Clear
        On Error GoTo 0
                
        view1.Close
        Set view1 = Nothing
        DoEvents
End Sub
Private Sub PopulateEventsList(ctlDayBlock As control)
On Error GoTo Err_PopulateEventsList
Dim strSQL2 As String
strSQL2 = "Table1.FldDate, Table1.Employee, Table1.TimeFrom, Table1.TimeTo, Table1.NewID "
strSQL2 = strSQL2 & "FROM Table1 "
strSQL2 = strSQL2 & "WHERE (((Table1.FldDate)=" & ctlDayBlock.Tag & "));"
lstEvents.RowSource = strSQL2
lblEventsOnDate.Caption = Format(ctlDayBlock.Tag, "mm-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
Private Sub Command44_Click()
On Error GoTo Err_Command44_Click

    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdDeleteRecord
Exit_Command44_Click:
    Exit Sub
Err_Command44_Click:
    MsgBox Err.Description
    Resume Exit_Command44_Click
    
End Sub

I think if I take the Highlight / circle date if booked kinda bit, then I might get something working?
________
Magic flight launch box
 
Last edited:
Its ok Guys I found the missing link to this

You need the Mscimct2.ocx file installed to make this work.. So now I got it all going.. I have my CD setup so it runs AccessRuntime2007 from CD, installs my Dbase and creates shortcut to Desktop and have the missing file "mscomct2.ocx" copied to windows\system32\ and on exit it runs regsvr32 to reg the file :D

Cheers for your help
________
TINY TITS LIVE
 
Last edited:

Users who are viewing this thread

Back
Top Bottom