Is there something called on-insert?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there equivalent of Form -> On-insert that
should fire when I am ready to save a new record?

Thank you,
-M
 
Place your cursor in each of the events in the properties box and the status
bar at the bottom of your screen tells you what each event is. Sounds like
you are looking for the BerforeInsert event.

Rick B
 
In looking a bit further, I don't know if that will do what you wnat. That
is fired when you start adding a record.

could you use Before Update and do some testing to see if it is a new
record?
 
Rick,

Thanks for your replies!
Yes, I am using beforeupdate, but there is a problem in using
that 'cause I am generating nos for a field, it should be done only on
insert, if I have the routine in beforeupdate
then every time users update a record, it generates the no.

There is no way to find out if the record being inserted
is new or existing?

Thanks again,
-Me
 
Then wouldn't the Before Insert function work? It would assign your number
as the user started creating it, not just before adding it to the table, but
that should not matter.

Rick B?
 
Just use BeforeUpdate and add an If-Then block so it only updates the field
if it is currently Null.
 
Rick,

That's what I did, I am checking if its null and updating
it.

Thanks for your help!
-Me
 
Back
Top