LearningAccess
asked on
Missing or broken reference after converting database to XP 2003
We have just had our machines upgraded to XP with Access 2003. We have an Access 97 database that we have just converted but we are now getting the following error:
"Your Microsoft Office Access database or project contains a missing or broken reference to the file 'doa2535.tlb version 3.5"
When I OK this - VB opens saying "Compile error: Can't find project or library" with Dim dbs As Database highlighted.
I have checked References and the following is ticked:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DOA 3.6 Object Library **** Not 3.5??
Microsoft ActiveX Data Objects 2.1 Library
How do we get around this???
"Your Microsoft Office Access database or project contains a missing or broken reference to the file 'doa2535.tlb version 3.5"
When I OK this - VB opens saying "Compile error: Can't find project or library" with Dim dbs As Database highlighted.
I have checked References and the following is ticked:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DOA 3.6 Object Library **** Not 3.5??
Microsoft ActiveX Data Objects 2.1 Library
How do we get around this???
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
by the way, if you decide to migrate to ADO, then lines such as this:
Dim dbs As Database
will NOT work, as ADO doies not have a Database Object - This code is DAO specific.
ADO works with the Connection object, not the Database Object.
AW
Dim dbs As Database
will NOT work, as ADO doies not have a Database Object - This code is DAO specific.
ADO works with the Connection object, not the Database Object.
AW
ASKER
The error is saying it can't find "file 'doa2535.tlb version 3.5"?? In the references it has "DOA 3.6 Object Library".
Located a related Microsoft KB article for Access 2002 though. http://support.microsoft.com/default.aspx?scid=kb;en-us;313233.
It is saying to check a box Microsoft DOA 2.5/3.5 Compatibility Library - but 2003 doesn't have this - do you know what else it could be??
Thank you so much!!!
Located a related Microsoft KB article for Access 2002 though. http://support.microsoft.com/default.aspx?scid=kb;en-us;313233.
It is saying to check a box Microsoft DOA 2.5/3.5 Compatibility Library - but 2003 doesn't have this - do you know what else it could be??
Thank you so much!!!
you still can use DAO 3.6 instead of the DAO2.5/3.5
cheers
cheers
ASKER
I have tried the first comment - unticking Microsoft DOA 3.6 Object Library & Microsoft ActiveX Data Objects 2.1 Library. No change.
Where do I go from here?? (Tell me if you need more points...very desperate...but only have 195 left).
Where do I go from here?? (Tell me if you need more points...very desperate...but only have 195 left).
can you try compacting and repairing the db then try to compile if compile pops an error please post where the code is highlighted
do not worry anout points mate
cheers
do not worry anout points mate
cheers
after you UNTICK the two references, click the OK button, then RE-OPEN the References dialog, and RE-SELECT both of the previously UN-Selected references, to re-select them. If they are unselected, you will get the error message that you are seeing.
AW
AW
ASKER
Sorry, that is what I had meant - I have unticked and reticked as suggested.
Also: Tried to compact and repair database but getting the same error "Your Microsoft Office Access database or project contains a missing or broken reference to the file 'doa2535.tlb version 3.5".
Code:
Private Sub FillOptions()
' Fill in the options for this switchboard page.
' The number of buttons on the form.
Const conNumButtons = 8
Dim dbs As Database
Dim rst As Recordset
Dim strSQL 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 dbs = CurrentDb()
strSQL = "SELECT * FROM [Switchboard Items]"
strSQL = strSQL & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
strSQL = strSQL & " ORDER BY [ItemNumber];"
Set rst = dbs.OpenRecordset(strSQL)
' If there are no options for this Switchboard Page,
' display a message. Otherwise, fill the page with the items.
If (rst.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this switchboard page"
Else
While (Not (rst.EOF))
Me("Option" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Caption = rst![ItemText]
rst.MoveNext
Wend
End If
' Close the recordset and the database.
rst.Close
dbs.Close
End Sub
Also: Tried to compact and repair database but getting the same error "Your Microsoft Office Access database or project contains a missing or broken reference to the file 'doa2535.tlb version 3.5".
Code:
Private Sub FillOptions()
' Fill in the options for this switchboard page.
' The number of buttons on the form.
Const conNumButtons = 8
Dim dbs As Database
Dim rst As Recordset
Dim strSQL 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 dbs = CurrentDb()
strSQL = "SELECT * FROM [Switchboard Items]"
strSQL = strSQL & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
strSQL = strSQL & " ORDER BY [ItemNumber];"
Set rst = dbs.OpenRecordset(strSQL)
' If there are no options for this Switchboard Page,
' display a message. Otherwise, fill the page with the items.
If (rst.EOF) Then
Me![OptionLabel1].Caption = "There are no items for this switchboard page"
Else
While (Not (rst.EOF))
Me("Option" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Visible = True
Me("OptionLabel" & rst![ItemNumber]).Caption = rst![ItemText]
rst.MoveNext
Wend
End If
' Close the recordset and the database.
rst.Close
dbs.Close
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks...I have created a new switchboard to get around issue. Still very wierd cause another database with the same code is working fine. Due to urgency I couldn't play around with it any longer.
AW