Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AfterUpdate on an Unbound subform not always firing

Status
Not open for further replies.

scotttom

IS-IT--Management
Mar 5, 2002
143
US
I've got an subform whose datasource gets set dynamically based on values in search fields on a main form.

My problem is this..

The afterUpdate event on a textbox control in the subform does not always fire. I've reduce the code to a simple msgbox and still nothing... sometimes.

I've tried the OnLostFocus also and it behaves the same way. I also tried the onExit but that created other problems.

I've never seen anything like this before. Anyone else?

Any clues would be greatly appreciated.
 
HI Duane,

Essentially I can't get ANY code to fire on afterupdate or OnLostFocus on certain records.

Basically, my goal was when a certain field was updated, code to open a specific form based on the value of another field would fire.

I reduced this down to a single msgbox for testing, set a break point and in some instances it just does not fire.

Some times it does and sometimes it doesn't and I can't find a pattern.

I've tried the same code onLostFocus and the same thing happens.

It's very odd.

Any idea?
 
OK... thanks for staying with me here...

I've recreated the sub form, recreated the main form, decompiled, compiled, imported all objects into another MDB and still no love.

After update does not fire. OnDoubleclick and onkeypress does but not afterupdate or onlostfocus.

What could be going on here?
 
I've run into the same thing when using a mouse to move from field to field, AfterUpdate fires if the user moves using the enter or tab keys, but if you do it via mouse, the event doesn't fire. Is this what you are seeing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top