Share via

remote server machine error message

Anonymous
2012-09-06T16:57:56+00:00

I'm developing a macro that opens a file and then manipulates the data.  When it is finished. it saves a copy of this file as a csv file.  Then it does the same thing to a second file.   It then opens an Access database and runs several queries before importing both of the cvs files.   After that I run a number of queries and export the results back to Excel.

Sometimes during this process, I will get the follwing MS Visual Basic error message: "The remote server machine does not exist or is unavaiable".

Sometimes I get this message the first time I run it and sometimes it is after the second or third time I run it.  I don't get the message on a consistent basis.  I've also checked to ensure the database isn't already open when I run the macro (no .ldb file).

This is the code I use to open the Access database from Excel:

Set AppAcc = New Access.Application

AppAcc.OpenCurrentDatabase "R:\Macros\Comparison.mdb"

AppAcc.DoCmd.SetWarnings False

After the database is opened, I run a number of queries in the database.

I'd like to elimiate this issue but am not sure what to do.  Any help or suggestions would be appreciated.  Thanks.....

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
2012-09-07T03:29:30+00:00

Are you having network problems, causing the R-drive to sometimes be unavailable?

To eliminate this as a possible cause, run the code entirely on your local machine.

AppAcc.OpenCurrentDatabase "C:\Test\Comparison.mdb"

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful