Results 1 to 2 of 2
  1. #1
    randolphoralph is offline Advanced Beginner
    Windows XP Access 2002
    Join Date
    Dec 2008
    Posts
    58

    Conversion from 2003 to 2010 error missing or broken reference to 'MSOWCF.DLL'

    I have 5 databases that are used within the company I work for. Last night the IT department upgraded some people from Access 2003 to Access 2010.



    This morning when the users opened the databases they began receiving a error message.

    The error message appears as soon as the database opens. I have the databases set to open directly to the switchboard. Here is the error message.

    Your Microsoft Access database or project contains a missing or broken reference to the file 'MSOWCF.DLL' version 1.0

    I have not converted the database from a .mdb to a .accdb since I still have some users with the older version of Access.

    I am thinking that the error message is caused by the code behind the switchboard but I am not sure what needs to be changed.

    Here is the code behind the switchboard.

    Code:
    Option Explicit
    Option Compare Database
    Private Sub Form_Open(Cancel As Integer)
    ' Minimize the database window and initialize the form.
        ' Move to the switchboard page that is marked as the default.
        Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
        Me.FilterOn = True
        
    End Sub
    Private Sub Form_Current()
    ' Update the caption and fill in the list of options.
        Me.Caption = Nz(Me![ItemText], "")
        FillOptions
        
    End Sub
    Private Sub FillOptions()
    ' Fill in the options for this switchboard page.
        ' The number of buttons on the form.
        Const conNumButtons = 8
        
        Dim con As Object
        Dim rs As Object
        Dim stSql As String
        Dim intOption As Integer
        
        ' Set the focus to the first button on the form,
        ' and then hide all of the buttons on the form
        ' but the first.  You can't hide the field with the focus.
        'Me![Option1].SetFocus
        For intOption = 2 To conNumButtons
            Me("Option" & intOption).Visible = False
            Me("OptionLabel" & intOption).Visible = False
        Next intOption
        
        ' Open the table of Switchboard Items, and find
        ' the first item for this Switchboard Page.
        Set con = Application.CurrentProject.Connection
        stSql = "SELECT * FROM [Switchboard Items]"
        stSql = stSql & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
        stSql = stSql & " ORDER BY [ItemNumber];"
        Set rs = CreateObject("ADODB.Recordset")
        rs.Open stSql, con, 1   ' 1 = adOpenKeyset
        
        ' If there are no options for this Switchboard Page,
        ' display a message.  Otherwise, fill the page with the items.
        If (rs.EOF) Then
            Me![OptionLabel1].Caption = "There are no items for this switchboard page"
        Else
            While (Not (rs.EOF))
                Me("Option" & rs![ItemNumber]).Visible = True
                Me("OptionLabel" & rs![ItemNumber]).Visible = True
                Me("OptionLabel" & rs![ItemNumber]).Caption = rs![ItemText]
                rs.MoveNext
            Wend
        End If
        ' Close the recordset and the database.
        rs.Close
        Set rs = Nothing
        Set con = Nothing
    End Sub
    Private Function HandleButtonClick(intBtn As Integer)
    ' This function is called when a button is clicked.
    ' intBtn indicates which button was clicked.
        ' Constants for the commands that can be executed.
        Const conCmdGotoSwitchboard = 1
        Const conCmdOpenFormAdd = 2
        Const conCmdOpenFormBrowse = 3
        Const conCmdOpenReport = 4
        Const conCmdCustomizeSwitchboard = 5
        Const conCmdExitApplication = 6
        Const conCmdRunMacro = 7
        Const conCmdRunCode = 8
        Const conCmdOpenPage = 9
        ' An error that is special cased.
        Const conErrDoCmdCancelled = 2501
        
        Dim con As Object
        Dim rs As Object
        Dim stSql As String
        
        'your variables
        Dim Hold As Variant
        Dim gotpass As String
        Dim tmpKey As Long
        Dim I As Integer
        Dim rs1 As ADODB.Recordset
        Dim db As DAO.Database
    On Error GoTo HandleButtonClick_Err
        ' Find the item in the Switchboard Items table
        ' that corresponds to the button that was clicked.
        Set con = Application.CurrentProject.Connection
        Set rs = CreateObject("ADODB.Recordset")
        stSql = "SELECT * FROM [Switchboard Items] "
        stSql = stSql & "WHERE [SwitchboardID]=" & Me![SwitchboardID] & " AND [ItemNumber]=" & intBtn
        rs.Open stSql, con, 1    ' 1 = adOpenKeyset
        
        ' If no item matches, report the error and exit the function.
        If (rs.EOF) Then
            MsgBox "There was an error reading the Switchboard Items table."
            rs.Close
            Set rs = Nothing
            Set con = Nothing
            Exit Function
        End If
        
        If Not rs!needpassword Then GoTo ignore
        'no need to do this pwd stuff
        
        DoCmd.OpenForm "frmPassword", acNormal, , , , acDialog
    'gemma's note
    'this is OK - the password should now be stored in the variable mypassword
        
        Hold = MyPassword
    'note i added a "raw" field in the password table, to avoid having to check out your
    'encryption code
        
        gotpass = Nz(DLookup("raw", "tblpassword", "[raw] = " & Chr(34) & Hold & Chr(34)), "")
        If gotpass <> Hold Then
            MsgBox ("Ops you did not enter the Magic Word")
            Exit Function
        End If
    'note from gemma
    'now - your code actually changes the password into an encrypted form, and then tests the encryption value
    'I have ignored this - but if you want to do it like that, you need to change the code here to see if the
    'encrypted value of page is in the table.
        
        
    ignore:
        
        Select Case rs![Command]
            
            ' Go to another switchboard.
            Case conCmdGotoSwitchboard
                Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rs![Argument]
                
            ' Open a form in Add mode.
            Case conCmdOpenFormAdd
                DoCmd.OpenForm rs![Argument], , , , acAdd
            ' Open a form.
            Case conCmdOpenFormBrowse
                DoCmd.OpenForm rs![Argument]
            ' Open a report.
            Case conCmdOpenReport
                DoCmd.OpenReport rs![Argument], acPreview
            ' Customize the Switchboard.
            Case conCmdCustomizeSwitchboard
                ' Handle the case where the Switchboard Manager
                ' is not installed (e.g. Minimal Install).
                On Error Resume Next
                Application.Run "ACWZMAIN.sbm_Entry"
                If (Err <> 0) Then MsgBox "Command not available."
                On Error GoTo 0
                ' Update the form.
                Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
                Me.Caption = Nz(Me![ItemText], "")
                FillOptions
            ' Exit the application.
            Case conCmdExitApplication
                CloseCurrentDatabase
            ' Run a macro.
            Case conCmdRunMacro
                DoCmd.RunMacro rs![Argument]
            ' Run code.
            Case conCmdRunCode
                Application.Run rs![Argument]
            ' Open a Data Access Page
            Case conCmdOpenPage
                DoCmd.OpenDataAccessPage rs![Argument]
            ' Any other command is unrecognized.
            Case Else
                MsgBox "Unknown option."
        
        End Select
        ' Close the recordset and the database.
        rs.Close
        
    HandleButtonClick_Exit:
    On Error Resume Next
        Set rs = Nothing
        Set con = Nothing
        Exit Function
    HandleButtonClick_Err:
        ' If the action was cancelled by the user for
        ' some reason, don't display an error message.
        ' Instead, resume on the next line.
        If (Err = conErrDoCmdCancelled) Then
            Resume Next
        Else
            MsgBox "There was an error executing the command.", vbCritical
            Resume HandleButtonClick_Exit
        End If
        
    End Function

  2. #2
    randolphoralph is offline Advanced Beginner
    Windows XP Access 2002
    Join Date
    Dec 2008
    Posts
    58
    After doing some further research it appears I am missing a file....

    I opened a module code page, then following menu-bar item Tools >> References to the dialog box and it says MISSING: Microsoft Office Web Components Function Library which shows the location as C:\Program Files\Microsoft Office\Office10\MSOWCF.DLL

    I have tried to browse to find the correct .DLL file and can not locate the file in the Office10 folder. I noticed there is a Office 14 folder...I checked in that folder, but can not located a file called MSOWCF.DLL

    I unchecked the Microsoft Office Web Components Function Library from the Reference List and compiled my code. I did not receive any error messages when I compiled my code and the missing MSOWCF.DLL error goes away.

    My only concern is that by unchecking this it will cause issues somewhere.

    Does anyone know what Microsoft Office Web Components Function Library does exactly?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Missing or broken references
    By AdrianR in forum Access
    Replies: 1
    Last Post: 06-21-2011, 10:34 AM
  2. 2003 to 2007 conversion error
    By paleoman in forum Access
    Replies: 1
    Last Post: 06-22-2010, 04:33 PM
  3. Replies: 0
    Last Post: 08-01-2009, 12:43 PM
  4. Microsoft Access 2003-Missing Records??
    By kristenlee in forum Access
    Replies: 1
    Last Post: 04-04-2008, 06:43 PM
  5. Replies: 1
    Last Post: 06-09-2006, 03:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums