error in loading DLL

G

Guest

I have an adp database that runs fine on 8 out of 9 computers. The 9th
computer is running Windows XP Pro and Office 2003 (as are 2 of the others).
On the 9th computer opening forms produces the following error:

compile error
error in loading DLL

The error occurs on the statement:
Set conn = CurrentProject.Connection
(the word Connection is highlighted)

I have checked and the references are the same as on the working PCs; they
are:
Visual Basic for Applications
Microsoft Access 11.0 Object Library

I have reinstalled Office and this has had no effect.

I tried using this instead:
Set conn = CurrentProject.AccessConnection
but this caused lots of errors.

{Perhaps the object library on the Office CD is corrupt - if so how do I get
hold of a good copy and how would I install it?}

CODE EXTRACT
Private Sub Form_Current()
On Error GoTo Form_Current_Err

Dim conn As ADODB.Connection
Dim RS As ADODB.Recordset
Dim strSQL As String
Dim intFormStyle As Integer

'Set conn = CurrentProject.AccessConnection
Set conn = CurrentProject.Connection
^^^^^^^^
 
A

Andreas

Unless I am mistaken, you should have a reference to the ADO library.
The name is something like Active X Data Objects 2.5 or later.

Regards,
Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top