Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
836 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 2000 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

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…
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

876 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