Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default Excel VBA Access Database Error

I use the following script to open an Access Database which has an autoexec macro that runs many reports and exports them out to specific servers for user access. On certain days of the week when network traffic is heavy the database takes 10 minutes or more to complete all of the tasks that have been coded into it. Excel comes back with an error that it is waiting for a job to complete which causes no other Excel Scripts to run until you click ok and the database completes it's functions. Is there a timeout setting within Excel Visual Basic that can be disabled in order to stop this message from Appearing?

Sub CorpLoad()
If (VarError = 0) And (Sheets("Email Running").Cells(9, 1) = Date) And (Sheets("Email Running").Cells(9, 2) = "") Then
' Initialize string to database path.
Const strConPathToSamples = "\\uscles611\purchdata\DATABASE\"
strDB = strConPathToSamples & "CORP.mdb"
' Create new instance of Microsoft Access
Set AppAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
AppAccess.OpenCurrentDatabase strDB
DoEvents
AppAccess.Quit
Sheets("Email Running").Cells(17, 1) = Date
Sheets("Email Running").Cells(17, 2) = ""
ActiveWorkbook.Save
Name "\\uscles611\PURCHDATA\QUARKAPPS\APPS\PURCH_AP\XCO MDATA\POFILE.TXT" As "\\uscles611\PURCHDATA\QUARKAPPS\APPS\PURCH_AP\XCO MDATA\OLDPO\" & Format(Date, "mmdd") & ".TXT"
Else
Sheets("Email Running").Cells(17, 1) = Date
Sheets("Email Running").Cells(17, 2) = "POFILE.TXT file not created"
End If
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Excel Database via Access Main Database with a script Finnbar New Users to Excel 2 November 3rd 08 07:24 PM
Excel Database or Access?? Centrol Excel Worksheet Functions 1 October 27th 08 09:56 AM
Do I need Excel or Access for my database needs? Emily Excel Discussion (Misc queries) 3 February 21st 08 05:04 PM
Excel error while trying to import data from an Access database - MSQRY32.exe has generated errors X_HOBBES Excel Discussion (Misc queries) 0 March 15th 05 06:46 PM
Excel database access Volker Jahn Excel Programming 0 January 7th 04 04:21 PM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"