Before Update event question

M

mscertified

If I am positioned on a new record (not yet saved) and I open a popup form
and then in the code for this form, I modify a bound field on my original
form and then close the popup form, does this trigger the 'before update'
event on the original form? This is what seems to be happening. I don't want
this event to trigger until I save the record or move to another record.
It seems that I have to postpone modifying the bound field until the 'before
update event'. This means that in the popup form, I have to save the value in
an unbound field and then move it to the bound field after all other 'before
update' validations pass. Does this sound right?
 
M

Marshall Barton

mscertified said:
If I am positioned on a new record (not yet saved) and I open a popup form
and then in the code for this form, I modify a bound field on my original
form and then close the popup form, does this trigger the 'before update'
event on the original form? This is what seems to be happening. I don't want
this event to trigger until I save the record or move to another record.


What you want is the normal behavior. The form's
BeforeUpdate event should not be triggered, unless the popup
does something to force a save in the form. I.e changes the
current record, explicitly saves the record, moves the focus
to a subform or closes the form.
 
L

Linq Adams via AccessMonster.com

Would not moving the focus to the popup form force a save of the original
form, just as moving from a subform to a main form does?
 
M

Marshall Barton

Linq said:
Would not moving the focus to the popup form force a save of the original
form, just as moving from a subform to a main form does?


Not when I try it. What happened when you tried it?
 
M

mscertified

All I can say is that after I changed the popup to modify an unbound control
instead of the bound control, the Before Update no longer triggers
prematurely.
Maybe something else was going on but since I got around the problem, I'm
not going to worry about it any more...
 

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