By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Microsoft Cant Append All Records

P: n/a
Hi All,

Is there a way to get the information in this message through VBA
code?
I run the query from code, but it does not throw an error, so my
error
trapping code will not catch it. I would like to somehow know when
this happens.
Thanks in advance!

Apr 16 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Matt" <md*******@yahoo.comwrote:
>Is there a way to get the information in this message through VBA
code?
I run the query from code, but it does not throw an error, so my
error
trapping code will not catch it. I would like to somehow know when
this happens.
Are you using docmd.runsql? If so use currentdb.execute instead.

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

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
Apr 16 '07 #2

P: n/a
On Apr 16, 1:29 pm, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:
"Matt" <mdw233...@yahoo.comwrote:
Is there a way to get the information in this message through VBA
code?
I run the query from code, but it does not throw an error, so my
error
trapping code will not catch it. I would like to somehow know when
this happens.

Are you using docmd.runsql? If so use currentdb.execute instead.

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

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 athttp://www.granite.ab.ca/accsmstr.htm
I append all of my errors to a table "tblErrors"

Would this allow me to do this?

Apr 16 '07 #3

P: n/a
"Matt" <md*******@yahoo.comwrote:
>I append all of my errors to a table "tblErrors"

Would this allow me to do this?
I have no idea what you are trying to do here.

Can you post your code?

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
Apr 16 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.