Compile Error: "Cant find project on Library" in MS 2003 but works fine in 2007
Hello everyone,
can someone please help me in determining this issue? I have the following piece of code that is erroring in MS 2003 but it works fine in 2007.
it highlights the "Set ref =" under the form_open and gives that error in 2003. Again it works fine 2007 so i am not sure what is going on. Can someone please assist?
Hello everyone,
can someone please help me in determining this issue? I have the following piece of code that is erroring in MS 2003 but it works fine in 2007.
it highlights the "Set ref =" under the form_open and gives that error in 2003. Again it works fine 2007 so i am not sure what is going on. Can someone please assist?
Code:
Private Sub Form_Open(Cancel As Integer)
'Maximize Access
DoCmd.RunCommand acCmdAppMaximize
'Resize form
DoCmd.Restore
'Set references
On Error Resume Next
Set ref = References.AddFromFile("C:\WINDOWS\system32\comdlg32.ocx")
Set ref = References.AddFromFile("C:\Program Files\Microsoft Office 2000\Office\MSO9.DLL")
Set ref = References.AddFromFile("C:\Progra~1\Common~1\Microsoft Shared\VBA\VBEEXT1.OLB")
Set ref = References.AddFromFile("c:\WINDOWS\SYSTEM32\DAO360.DLL")
Set ref = References.AddFromFile("C:\Program Files\Microsoft Office\Office\MSACC8.OLB")
Set ref = References.AddFromFile("C:\PROGRA~1\COMMON~1\Microsoft Shared\VBA\VBA332.DLL")
Set ref = References.AddFromFile("C:\WINDOWS\SYSTEM32\MSSTDFMT.DLL")
On Error GoTo 0
End Sub