Provoking BeforeInsert

D

Daniel

On the unload of one form I look for a confirmation of
that appointment and if there is not one I open a blank
one for that appointment. On the Conf form, the
beforeinsert event will run code that puts the appt
information on the form. If I want to create the form but
not necessarily make the user enter any data on the form,
how do I do that? In effect I want to provoke the
beforeinsert event without having the user have to input
anything on the form.

Is that clear?

Dan
 
P

Pavel Romashkin

I think the following would work:
Create a bound control, say, to an autonumber field or any other field
that is not user-controlled. In the Load event, put a value in it, so
that the form immediately becomes Dirty upon Load. This way BeforeUpdate
will get triggered. In the BeforeLoad, check for the user-entered
information, and if it is not present, you can cancel the update and
avoid the dirty field being inserted in the data table.

Hope this is what you are after.
Cheers,
Pavel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top