> I went to the Access help files but am still a little unclear HOW it works.
According to the help file, the Cancel Method applies to three types of
objects, Connection, QueryDef, or Recordset. Can anyone help me understand
what object does this command acts on?
It is an argument of the event procedure. Some event procedures
(Access-generated procedures) contain a "Cancel" argument, the default value of
which is "False". If you set this value to "True" within the procedure, the
event is cancelled. You can find this in Access Help - search for "event
property" in the "Index" tab of Help, select from the topic list "Events and
Event Properties Reference", then click on the "Exit" event in the pane to the
right, and then, in the resulting page, click on the "Event Procedures"
hyperlink at the top and, since there should only be one item in the dialog
list, simply click on "Display". I know it's a long and confusing haul to get
there, but there are a few weaknesses in Help in later versions.
--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at
http://www.mvps.org/access)
NO Email Please. Keep all communications
within the newsgroups so that all might benefit.<<