Solved

VBA:  How do I get Pop-Up Box to "OK" itself - and disappear without me sitting there to do it?

Posted on 2008-06-12
6
795 Views
Last Modified: 2013-11-27
MS-Access-2003:  VBA Module Coding - opearting via Macro :

I have an Array that runs and at the end it gives a Pop-Up Box that shows either an Error with Error # or it will show Completed with No Errors.    I have to sit there and hit 'OK' for the Macro to proceed to the next Module.

How can I "automate" that OK - so that the box will pop-up and after a few seconds will go ahead and "OK" itself disappear - so that the Macro get proceed further?

Please help,  thanks,  sincerely, Raj.
0
Comment
Question by:R B
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 21768723
If you don't intend to read the message why are you creating it?
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21768779
more work, but you can.
create your own message form with timer.
0
 
LVL 2

Accepted Solution

by:
366306 earned 500 total points
ID: 21769397
If you're wanting to know the errors but continue with the routine, you could have the error handler write the error into a table built for errors.

Hope that helps
On Error Goto errhandle
 
<your code here>
 
exit sub
errhandle:
currentdb.execute "INSERT INTO tblLog (ErrDescription, ErrNumber, ErrTime) VALUES ('" & err.description & "', " & err.number & ", now())"
resume next
end sub

Open in new window

0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:R B
ID: 21771505
I want the Table Built for Errors to go to a certain location:   P:Prod:Aud:
How do I tell it this?  

Also where do I insert the code above?

The error export commands occur in 4 export segments:

ErrorExportAUD:
Set qry = Nothing
Set dbn = Nothing
ERRID = ERRID Or 1
DoCmd.Hourglass False
For Each err In Errors
  MsgBox err.Number & vbCrLf & err.Description
Next
End Sub

ErrorExportBUD:
Set qry = Nothing
Set dbn = Nothing
ERRID = ERRID Or 2
DoCmd.Hourglass False
For Each err In Errors
  MsgBox err.Number & vbCrLf & err.Description
Next
End Sub

ErrorExportMID:
Set qry = Nothing
Set dbn = Nothing
ERRID = ERRID Or 3
DoCmd.Hourglass False
For Each err In Errors
  MsgBox err.Number & vbCrLf & err.Description
Next
End Sub

ErrorExportEND:
Set qry = Nothing
Set dbn = Nothing
ERRID = ERRID Or 4
DoCmd.Hourglass False
For Each err In Errors
  MsgBox err.Number & vbCrLf & err.Description
Next
End Sub

Thanking you for your timely help, sincerely, Raj.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 21774509
0
 

Author Closing Comment

by:R B
ID: 31466520
Thank you very much for the coding.  It apply to the fix my module.
sincerely, Raj.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question