Developer Extension and Query Warnings

ASherbuck

Registered User.
Local time
Today, 01:38
Joined
Feb 25, 2008
Messages
194
Ok,

I have made a small price checking program that uses 1 form and subform and a few queries to move information from an inventory table to a History table when a user clicks an Add Me control button. The history table can be viewed in the subform. The Inventory table is in the main form.

The Add Me Control simply runs an append query to move the currently viewed item into the history table.

My question is such. On my version of access 2007 I have query warnings turned off, but when I make my install with the dev extensions, specifying to install the run time environment if 2007 isn't detected, and when another user installs on their machine everytime they hit the Add Me button they have the two warnings pop up "You are about to append 1 row" "You cannot undo these changes."

The run time doesn't have options to turn it off, it doesn't have any options really. Is there coding I can use instead of the query to perform this task or is their a way to disable these warnings?
 
You can either use

CurrentDb.Execute YourSQLStringHere

or you can use

DoCmd.SetWarnings False
...run your query
DoCmd.SetWarnings True

And if you do that, be sure to put in an error handler on that event which has, as its first line, DoCmd.SetWarnings True or else upon an error before getting to the reset your user could find themselves without any warnings at all.
 
Well,
Thank you very much this worked perfectly.
 

Users who are viewing this thread

Back
Top Bottom