Turn off 'Can't Append" Message

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

A button activates several append queries that modify and
add data to a table based on several other tables. The
tables are designed to prevent dups and I want the table
to reject certain records.

How do I tell Access to not tell the user that records
cannot be appended? In other words, I want it to do its
thing without bothering the user with the details.
Thanks,
Rick O
 
How do I tell Access to not tell the user that records
cannot be appended? In other words, I want it to do its
thing without bothering the user with the details.

An alternative method would be to get the append query right, so that the
duplicates are not attempted in the first place:

INSERT INTO MyNewTable (FieldOne, FieldTwo, FieldThree)
SELECT FieldA, FieldB, FieldC
FROM MyOldTable
WHERE FieldA NOT IN
( SELECT ALL FieldOne FROM MyNewTable )

It should be possible to do it with a join, which is probably a little bit
quicker too, but less readable.

Hope that helps


Tim F
 
Rick,
A simpler method on not providing messaging on appending
errors would be turn off warning and then turn back on
after you are finished. You might also add a line that
turns the echo off as well.

ex: DoCmd.SetWarnings False
docmd.echo false, "" --you might put a message here.

When finished:
DoCmd.SetWarnings True
DoCmd.ECHO True, ""

jsr
 
Back
Top