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
777 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 119

Expert Comment

by:Rey Obrero
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now