PC Review


Reply
Thread Tools Rate Thread

displaying warning message

 
 
=?Utf-8?B?SlQ=?=
Guest
Posts: n/a
 
      23rd Aug 2007
I have a macro in an Excel workbook that imports data into an Access
database. Once the data is imported, the following sub is automatically run
to compact the database for the user.

Several warning messages are displayed as the databases compacts. The
problem is, depending on the number of applications the user has open, the
warning messages do not always display. After a while, another message,
"waiting for OLE automation" error is displayed because the user hasn't
clicked "open" on the warning message.

The reason for visible = false is that we don't want the user to see the
screen change. We want the database compact to be virtually invisible to the
user.

Is there a way to ensure the original warning message will always be
displayed on top of any applications that may be opened? Thanks for the
help........

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Sub CompactDB()

vDB = ActiveWorkbook.Sheets("Information").Range("C5")

Set AppAcc = New Access.Application
AppAcc.Visible = False
AppAcc.OpenCurrentDatabase vDB

DoCmd.SetWarnings False

AppAcc.CommandBars("Menu Bar").Controls("Tools").Controls("Database
utilities"). _Controls("Compact and repair database...").accDoDefaultAction

DoCmd.SetWarnings True
AppAcc.Visible = True
AppAcc.Quit acQuitSaveNone

Set AppAcc = Nothing

End Sub

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
JT
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent Open File - Security Warning window from displaying =?Utf-8?B?QmV2eV9KZXRlcg==?= Windows XP General 1 31st Dec 2005 07:40 PM
Displaying warning messages... =?Utf-8?B?SXJmYW4gQWtyYW0=?= Microsoft ASP .NET 2 27th Dec 2004 11:13 PM
Displaying a message in a message box without requiring user to click anything to proceed Android Microsoft Excel Programming 2 25th Jun 2004 06:44 PM
Warning message when creating a message in Outloo J. Alyn Microsoft Outlook Discussion 0 7th Jun 2004 05:28 PM
Password warning not displaying Mike Windows XP Security 1 21st Jan 2004 12:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:53 PM.