Turn off warnings but still print them to text file

  • Thread starter Thread starter Ben8765
  • Start date Start date
B

Ben8765

Hi,

Is there a way to turn off the warnings, but still print them to a text
file(log)?

-Ben
 
Ben8765 said:
Hi,

Is there a way to turn off the warnings, but still print them to a text
file(log)?


You mean the warnings about "You are about to append/delete n records"? You
can't log that information without programming for it specially. If it's
information from executing action queries via RunSQL, you can use the DAO
execute method to run the query and immediately check the database object's
RecordsAffected property, and use your own code to write that information to
a log file. For example,

With CurrentDb

.Execute "DELETE FROM Table1 WHERE DateField<Date()", _
dbFailOnError

WriteLog "Deleted " & .RecordsAffected " records from Table1"

End With

If you want to log such activities when carried out via form operations, you
need to use special code to do that, too.
 
Thanks, a lot, i'll try this tomorrow.

-Ben

Dirk Goldgar said:
You mean the warnings about "You are about to append/delete n records"? You
can't log that information without programming for it specially. If it's
information from executing action queries via RunSQL, you can use the DAO
execute method to run the query and immediately check the database object's
RecordsAffected property, and use your own code to write that information to
a log file. For example,

With CurrentDb

.Execute "DELETE FROM Table1 WHERE DateField<Date()", _
dbFailOnError

WriteLog "Deleted " & .RecordsAffected " records from Table1"

End With

If you want to log such activities when carried out via form operations, you
need to use special code to do that, too.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
Back
Top