Error Message box
- From: "Alex Martinez" <alex_martinez@xxxxxxxxxxx>
- Date: Wed, 10 Aug 2005 22:55:01 -0700
Hi,
I am using Access 2002 and I have a command button that will delete data
from a table which will import an Excel file and append the file into the
main table and a message box (macro) will appear stating that "Upload
Completed" if the user proceed. Below is my coding:
'Delete data in AuditUpload file
CurrentDb.Execute "DELETE * FROM AuditUpload", dbFailOnError
'Upload AuditUpload sprea*** from Excel spread***
On Error GoTo Err_cmdUploadAppend_Click
Dim stDocName As String
stDocName = "Audit Upload"
DoCmd.RunMacro stDocName
'Append AuditUpload to main audit inventory file
Dim stDocName1 As String
stDocName1 = "Append Audit Inventory Query"
DoCmd.OpenQuery stDocName1, acNormal, acEdit
'Notify user upload has completed
Dim stDocName2 As String
stDocName2 = "Upload Completed Message Box"
DoCmd.RunMacro stDocName2
Exit_cmdUploadAppend_Click:
Exit Sub
Err_cmdUploadAppend_Click:
MsgBox Err.Description
Resume Exit_cmdUploadAppend_Click
My question is if a user press the command button and decide to not append
the file where do I place run macro command in the current code? All I want
is to have a message box (macro) to appear saying "Upload/Append not
completed" when the user aborts the append command. If my code needs
cleaning up, please let me know. I am trying to understand message box
errors. Any tips will be appreciated. Thank you.
.
- Follow-Ups:
- Re: Error Message box
- From: Allan Murphy
- Re: Error Message box
- Prev by Date: Re: open a form with userlevel criteria
- Next by Date: Re: Clearing a collection...
- Previous by thread: saving username and updating date
- Next by thread: Re: Error Message box
- Index(es):