Event procedure not being called

  • Thread starter Thread starter Duncan Edment
  • Start date Start date
D

Duncan Edment

I have a form which has a sub-form within it. The sub-
form has its "On Current" event property set to a valid
procedure within the code module. However, when I display
the form, and subsequently the sub-form, the event
procedure is not called. However, two calculated fields
on the sub-form are populated with valid data--data which
can only be calculated in the "On Current" event
procedure!!! Yet, if I set a breakpoint within the "On
Current" event, it does not get called!!

What gives?

Duncan
 
Open the subform in design view, and verify that its On Current property is
set to:
[Event Procedure]
Sometimes that setting gets lost.

Try adding a Debug.Print or MsgBox to the top of the procedure. My guess is
that the procedure is being called called, but the breakpoint is not working
due to settings, or because the project is partially corrupt. A repair
and/or decompile might fix that.
 
Could be an if statement that bypasses your breakpoint. Try a messagebox or
a stop statement somewhere to test it further.
 
Kailash,

I should have made it more clear in my post, but the
breakpoint is on the first statement of the Event
procedure. So, there's no chance of it getting by-passed.

Allen,

Yep, that was the first thing I checked and the "On
Current" property is definately set to "[Event Procedure]".

I've tried the MsgBox avenue, and it doesn't display
either. So, I can only take from this, that the procedure
itself is not getting called.

I'll try a "Compact & Repair" and see what happens.

Duncan
 
Back
Top