Hi MelissaLambino,
Show or hide warning messages programmatically
You can temporarily disable the modal (modal: A window or dialog box that
requires the user to take some action before the focus can switch to
another form or dialog box. Dialog boxes and messages are usually modal.)
warning messages displayed by Microsoft Access while a macro or Microsoft
Visual Basic procedure is running, and enable them again by carrying out
the SetWarnings action in the macro or procedure.
Use a macro
To open an existing macro, click Macros under Objects, select the macro,
and then click the Design button on the Database window toolbar.
In the place in the macro where you want to stop or resume the display of
modal warning messages, add the SetWarnings action.
How?
In the Macro window, click the first empty row in the Action column. If you
want to insert an action between two action rows, click the selector for
the action row just below the row where you want to insert the new action,
and then click Insert Row on the toolbar.
In the Action column, click the arrow to display the action list.
Click the action you want to use.
In the lower part of the window, specify arguments for the action, if any
are required. For action arguments whose settings are a database object
name, you can set the argument by dragging the object from the Database
window to the action's Object Name argument box.
Type a comment for the action. Comments are optional.
To temporarily stop the display of warning messages, set the Warnings On
argument to No. To resume displaying them, set the Warnings On argument to
Yes.
Click Save to save the macro.
To test, click Run on the toolbar.
If the Warnings On argument was set to No, the display of warning messages
automatically resumes when the macro stops running.
Use Visual Basic code
Open a Function or Sub procedure in the Code window.
In the place in the procedure where you want to stop or resume the display
of modal warning messages, use the SetWarnings method to carry out the
SetWarnings action.
How?
Microsoft Access defines a special object, DoCmd, that you use to carry out
macro actions in Microsoft Visual Basic procedures. You carry out an action
by adding a method of the DoCmd object to your procedure.
In the procedure, add the DoCmd method that corresponds to the action by
using the following syntax:
DoCmd.method [arguments]
Method is the name of a method. Arguments are the method arguments, if
there are any.
For example:
DoCmd.SetWarnings False
To temporarily stop the display of warning messages, set the warningson
argument to False. To resume displaying them, set the warningson argument
to True.
To test, run the procedure by opening the form in Form view and performing
the event that triggers the procedure
If the the warningson argument was set to False, the display of warning
messages automatically resumes when the code stops running.
For Further Inforamtion :
http://office.microsoft.com/assistance/preview.aspx?AssetID=HP051868861033&C
TT=1&Origin=EC790000701033&QueryID=dXh5Oylcm&Query=Show+or+hide+warning+mess
ages+programmatically&Scope=TC%2cHP%2cHA%2cRC%2cFX%2cES%2cEP%2cDC%2cXT
Please let me know has this helped You...
Thank you...
Raghu...
This posting is provided "AS IS" with no warranties, and confers no rights.