Event won't fire

J

JimS

I have a very simple form. It's a header/detail structure with PO Header and
PO Lines. PO Lines is presented on a subform in continuous forms. Whenever I
change a line, I want to add up the dollar amount and post it to the header.
I know, redundant, but it'll be awhile before I can get in and fix that.

My problem is that I can't get events to fire on the form. I added an
AfterUpdate event to do the addition, and set an F9 break on it. It never
fires. The addition is not posted to the main form.

I can't seem to get this fixed. The only thing that's unusual about this
form is that the form and subform began life with different names (the wizard
named them, then later I renamed them). It seems the event handlers I've
added since the rename are the ones not firing...

Any ideas?
 
J

John W. Vinson

I have a very simple form. It's a header/detail structure with PO Header and
PO Lines. PO Lines is presented on a subform in continuous forms. Whenever I
change a line, I want to add up the dollar amount and post it to the header.
I know, redundant, but it'll be awhile before I can get in and fix that.

My problem is that I can't get events to fire on the form. I added an
AfterUpdate event to do the addition, and set an F9 break on it. It never
fires. The addition is not posted to the main form.

I can't seem to get this fixed. The only thing that's unusual about this
form is that the form and subform began life with different names (the wizard
named them, then later I renamed them). It seems the event handlers I've
added since the rename are the ones not firing...

Any ideas?

There is evidently an error in your code... but we can't see your code. Please
post it so we can help. Indicate the names of the forms and the (more
relevant) name of the Subform Control.
 
L

Linq Adams via AccessMonster.com

"My problem is that I can't get events to fire on the form."

Does this mean that no code works? If not, are you running version 2007?

Code does not run in 2007 unless your database resides in a folder that has
been declared a “trusted†location.

To trust your folder, click:

Office Button (top left)
Access Options (bottom of dialog)
Trust Center (left)
Trust Center Settings (button)
Trusted Locations (left)
Add new location (button)
 
D

Daryl S

JimS -

It sounds like you put an AfterUpdate event on the form - you want it on the
subform. Remember you need to leave the detail record (e.g. click somewhere
else or tab out of the record) before it is updated.
 

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