• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

MSAccess dll missing

This code was working fine on the cusomter's machine up to a week ago.  It is still working on mine and I can't figure out what is wrong....

Code:

    Set OBJLocaldbConnection = CurrentProject.Connection
    ObjLocaldbCommand.ActiveConnection = OBJLocaldbConnection
    OBJLocaldbConnection.CommandTimeout = 0


It is obvious something got clobbered on their machine, but I am clueless how to fix.

Any suggestion would be very helpful!  thank you.
0
CaroleTSullivan
Asked:
CaroleTSullivan
  • 7
  • 6
1 Solution
 
Jeffrey CoachmanCommented:
Make sure the Microsoft ADO library is loaded in the VBA references

Open the VBA Editor and click:
Tools-->References

;-)

JeffCoachman
0
 
CaroleTSullivanAuthor Commented:
it is.  That is the wierd thing.  
0
 
Jeffrey CoachmanCommented:
What happens if you comment out the Timeout line?

What happens if you change it to 30,000 (30 seconds, the default)?

See here for some notes regarding a bug with this:
http://support.microsoft.com/kb/175264

JeffCoachman

0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
Jeffrey CoachmanCommented:
...Also, can you try this with DAO and see if that will work...?

(Obviously you must Load the MS DAO library, in the VBE)
0
 
CaroleTSullivanAuthor Commented:
regarding using DAO .... is the code the same.  How would I have to change it?  Thanks.
0
 
Jeffrey CoachmanCommented:
<How would I have to change it>
Not sure, you never stated what your code is doing..., nor did you post the entire code, or say what event this is on...
;-)

But here is a basic DAO Syntax:

'Declare the Recordset
Dim rst As DAO.Recordset
'Set the Recordset equal to a table, query or SQL string, in the currently open database
Set rst = CurrentDb.OpenRecordset("YourTableOrQueryOrSQL")
    'Move to the first Record
    rst.MoveFirst
    'Loop through the table records, until you reach the end
    Do Until rst.EOF
        'Do Something
        'Move to the next record
        rst.MoveNext
    'Return to the top to loop again
    Loop

'----Object Cleanup
'Close the Recordset
rst.Close
Set rst = Nothing

;-)

JeffCoachman
0
 
CaroleTSullivanAuthor Commented:
Boag2000:  thank you for your suggestion but because the ADODB object is used all over the code, I would hate to rewrite this production code UNLESS there is no other alternative.  I'm kinda thinking that some update to the clients machines (because all of them are affected) clobbered something.  I may try having their tech group reinstall MSAccess or something like that.  Thank you again.  I will keep you posted.  should have an answer by Friday.
0
 
Jeffrey CoachmanCommented:
I know, I just wanted to see if this even worked...
So we could rule out the connection technique...
0
 
CaroleTSullivanAuthor Commented:
the actual error is a compile error....says it cannot load the dll
0
 
CaroleTSullivanAuthor Commented:
the actual error is:  Compile Error  Error loading in dll   and it is on this statement.....

Set OBJLocaldbConnection = CurrentProject.Connection
0
 
Jeffrey CoachmanCommented:

1. Again, can you explain what your ultimate goal is with this code?
Is this the full code?
I don't see where you are declaring: OBJLocaldbConnection

2. When you open the References Dialog box, does anything say "MISSING"?

3. You may need to reinstall this dll...

JeffCoachman
0
 
CaroleTSullivanAuthor Commented:
thanks for your help.  a reinstall was in order and DID fix the issue.  take care and thanks again!
0
 
Jeffrey CoachmanCommented:
;-)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now