add a single record

A

Adam

I am using Access 2003. I have a form for filing an incident report with a
subform for which students were involved. I have a subprocedure set up to
automatically open Outlook and send an e-mail containing all of the
information from the form fields to the appropriate people. The problem I am
having is that I don't know on which event to have the subprocedure fire. If
I have it set on the on update or insert events, it fires as soon as I enter
the subform. I had it set to run from a button on the form, but then I have
to worry about the users adding two records (the e-mail subprocedure pulls
the info from the form fields so it can only send the info from a single
record.) A workaround would be to restrict the form to only being able to
add a single record. I obviously can't set the allow additions property to
no. Is there a way to set a form's property to add a single record? If not,
any suggestions as to my above dilemma would be appreciated. Thanks.
 
B

Brian Bastl

Why not set the form's Cycle property to Current Record and remove the
navigation controls? Then you can use the command button as intended.

Brian
 
A

Adam

I guess I spoke too soon. I have the form's cycle property set to "current
record" which works well for the tab key, but the mouse wheel still moves the
form to a new record. Any more thoughts?
 
A

Adam

I answered my own question. I set the form's "on current" event to run the
following single line of code:

docmd.gotorecord , acFirst

So far it has worked
 
Top