Problem with Deleting Query

L

lin

I have a form for Product Prices(frm_product Prices). The
record source for this form is tbl_Products. I have a
button in this form "Update". Each month I am getting
updated price list in excel. Using the Update button , I
would like to Update the Price List. What I did here is
Using the deleting query, I detete the contents from the
table "tbl_Products" and using append query I append the
the new prices from excel to the table. It is working
fine. but the Problem with that is when delete query runs,
I am getting the warning message " You are about to delete
10000 records from the table, You want to continue?". I
know I can disable this message with setting
in 'Option'.When I give this program for our customers,
they will get the same message too. Is there anyway I can
disable this message with code?.
Another prblem with this is I tried to link this table but
I am getting to linked the table to different
name "tbl_Products1". Is there anyway I can link to this
table successfully? Any help! Really appreciated.
 
G

Greg Kraushaar

You can do it on a case by case basis by...
DoCmd.SetWarnings False
DoCmd.RunSQL ("YourActionQuery;")
DoCmd.SetWarnings True

but this wil turn the wornings back on, even if the cutomer normally
has the warnings turned off

Or you can get more sophisticated, and use SetOptions and GetOptions
to set the state for your database when it opens, and then resetr it
back to the customers setting when the Database closes.
see the help file for details
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top