Unable Access error messages ??

  • Thread starter Thread starter Fie
  • Start date Start date
F

Fie

Hi,

How can I say in VBa to not show the standaard "error" messages? Like 'you a
about to delete X records' ...

Any ideas ??

Fie
 
Fie said:
Hi,

How can I say in VBa to not show the standaard "error" messages? Like 'you a
about to delete X records' ...

With a database open fo to Tools ... Options, then then Edit/Find tab. Look
for the checkboxes to Confirm Document Deletions, Action Queries, Record
Changes, and make sure they are checked. Close and re-open Access.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I don't know how to use VBA for your purpose, but if you click Tools >
Options, then click the Edit tab there is a Confirm section. Make the
choices there. This applies to Access 2000. It's similar in Access 97; I
don't know about later versions.
 
Arvin Meyer said:
With a database open fo to Tools ... Options, then then Edit/Find tab.
Look
for the checkboxes to Confirm Document Deletions, Action Queries, Record
Changes, and make sure they are checked. Close and re-open Access.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

I don't what them truned of all the time however, just when executing
certain parts of coding ...

Fie
 
If your using code then use:

On Error Resume Next

This will not generate a error message.

Hope this helps
 
If you're working in code use:

DoCmd.SetWarnings False
DoCmd.RunSQL "Delete * From MyTable Where ..."
DoCmd.SetWarnings True

OR:

You can use the Execute method which won't generate the error in the first
place:

CurrentDb.Execute "Delete * From MyTable Where ..."
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
I answered this several days ago, but I don't see it here. You can turn the
messages on and off in your coding with SetWarnings as in:

DoCmd.SetWarning True ' on

DoCmd.SetWarning False ' off

Always make sure you use the second one in your exit routine so that even if
you have an error you'll turn them back on.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top