Excel freeze when ran from server drive

G

Guest

Hello Everyone:

Good day and best regards.

I work from a shared server drive "eg: Shared on 'Company\Public (G:)". In
this folder there are two files, one Access mdb the other Excel with macros.
The mdb is to store the thousands of records. The Excel file would have to
extract selected records from the mdb for graphing.

When I ran the Excel file copied and stored in my own computer say C: drive,
importing the mdb info, the macros ran as intended. This is the case
regardless if the mdb was in the server or not.

But if the Excel file were in the server G: drive, the Excel freeze (not
running) on me.

How do I be able to run the Excel from the G:?

Thanks for your support.

Zimme
 
G

Guest

Hello everyone:

Good day. Sorry I did not provide the codes in my last post. I have an
update finding.

Upon stepping through the codes, I found that the Excel freezes (not
responding as appeared in the window task lists) happened when I
“wrkjet.OpenDatabase†from the (G:) network drive.

Could I open a network mdb file in the workspace created?

Thank you for your advice. The codes I used are as followed. It is a
modification from the discussions I found here. The DB and Server paths and
names are captured from previous sub.


Sub AppdData()

'enable DAO and ADO references


Dim dbs As database
Dim wrkjet As workspace
Dim fname As String
Dim sqlVS As String
Dim strDBPath As String
Dim strDBName As String
Dim strServerPath As String
Dim strServerName As String

fname = strDBPath + strDBName

Set wrkjet = CreateWorkspace("", "admin", "", dbUseJet)
Set dbs = wrkjet.OpenDatabase(fname, True)

sqlVS = "INSERT INTO efm_vs SELECT * FROM [" + strServerPath +
strServerName + "].EFM_VS;"

dbs.Execute sqlVS
dbs.Close

End Sub


Zimme
 

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