System generated Message Boxes on Update

Sharad

Registered User.
Local time
Today, 15:18
Joined
Jan 23, 2003
Messages
26
I have this Database program I am working with. The program works fine but when I click Add Record button it INSERTS the data into the Table. Howerver, before it appends it displays this Message Boxes warning that you are about to append a row, etc.

Is there any way to control these system generated Message Boxes. Any suggestions in this area will be appreciated. Thanks.
:confused:
 
Hi Sharad,

Just do a SetWarnings = False before the append query. Run the query. Then do a SetWarnings = True. However, don't do this initially so that you can see if you may have problem with the records you are appending. When SetWarnings = False and the record to be appended violates any of the table constraints, the record will not be appended and you won't know about it.

Mike
 
You are right as to Setwarnins False could cause problems in detecting actual problems. I tested it several times and everything works fine. The users were getting annoyed to have the Message Boxes pop up. After that I tried the code;

DoCmd.Setwarnings False
<Run the Query>
DoCmd.Setwarnings True.

This worked fine. Thanks for your timely response.:)
 

Users who are viewing this thread

Back
Top Bottom