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
823 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses
Course of the Month6 days, 3 hours left to enroll

627 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