Runtime Access 2007

M

mmangia

Hi,

I have a problem with access runtime 2007.

I make an application with access 2007 with some query. I disable the
confirm message for execution of the query.

When I use the runtime version I have for every query this message
again. Can I make anything to disable even in the runtime version?

Thank for your answer.

Marco
 
T

Tony Toews [MVP]

I make an application with access 2007 with some query. I disable the
confirm message for execution of the query.

When I use the runtime version I have for every query this message
again. Can I make anything to disable even in the runtime version?

I prefer, if DAO, to use Currentdb.Execute strSQL,dbfailonerror
command instead of docmd.runsql. For ADO use
CurrentProject.Connection.Execute strCommand, lngRecordsAffected,
adCmdText

If you're going to use docmd.setwarnings make very sure you put the
True statement in any error handling code as well. Otherwise weird
things may happen later on especially while you are working on the
app. For example you will no longer get the "Do you wish to save your
changes" message if you close an object. This may mean that unwanted
changes, deletions or additions will be saved to your MDB.

Also performance can be significantly different between the two
methods. One posting stated currentdb.execute took two seconds while
docmd.runsql took eight seconds. As always YMMV.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tom Ventouris

Did you disable the confirm message in the DB Options?
If so, disable the warnings in the code running your query:
Insert this code at the start: DoCmd.SetWarnings False
Remember to enable warnings at the end of the procedure/code with:
DoCmd.SetWarnings True
 

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