No On Current event for subdatasheet forms?

  • Thread starter Thread starter kiln
  • Start date Start date
K

kiln

I'm having problems getting the oncurrent event for subdatasheet forms
to fire at all; except that they fire when the parent datasheet view
form is opened. Anyone know what this is about?
 
Addtional testing has shown that if AllowAdditions is set to false, the
on current event fails to fire. At least in the app I've built. I can't
repro the failure in bare bones database so far. This would appear to be
a bug, AllowAdditions shouldn't ever impact OnCurrent.

This is A2k sp3.
 
kiln said:
Addtional testing has shown that if AllowAdditions is set to false,
the on current event fails to fire. At least in the app I've built. I
can't repro the failure in bare bones database so far. This would
appear to be a bug, AllowAdditions shouldn't ever impact OnCurrent.

I can think of one case where it should and will -- if there are no
existing records to be displayed, then if AllowAdditions is False, no
blank "new" record will be displayed, and hence the Current event will
not fire. If AllowAdditions is True (and the recordset is updatable)
there will be a "new" record, and the Current event will fire.

If you're observing this problem in other conditions, though, it's
probably a bug.
 
Yeah it's a bug. I have rebuilt the subform that exhibits the behavior
four times now. Each time it works as advertised till I set
allowadditions = false and then the event is history, regardless of
existing recs or not. Still cannot repro in a built to exhibit the bug.

I've been able to stop gap fix the issue for the particular app by
placing the code that needs to run in the on current event of the
subdatasheet into the parent datasheet oncurrent. The bug seems to be on
the order of: when moving to a new parent rec, it's on current fires,
but the subdatasheet's oncurrent event is obliterated.
 
kiln said:
Yeah it's a bug. I have rebuilt the subform that exhibits the behavior
four times now. Each time it works as advertised till I set
allowadditions = false and then the event is history, regardless of
existing recs or not. Still cannot repro in a built to exhibit the
bug.

I've been able to stop gap fix the issue for the particular app by
placing the code that needs to run in the on current event of the
subdatasheet into the parent datasheet oncurrent. The bug seems to be
on the order of: when moving to a new parent rec, it's on current
fires, but the subdatasheet's oncurrent event is obliterated.

This only happens with a subform in datasheet view? What version of
Access are you running? Have you opened a support incident with
Microsoft, or otherwise reported it? I'd be interested in looking at a
demonstration database, if you'd care to send one -- remove NO SPAM from
my posting address to get a valid e-mail address.
 
Thanks Dirk

This is Access 2000 sp3. It happens with a parent datasheet form, and
with the subdatasheet as either a datasheet mode or cont form mode. If I
can ever get the simple repro db to emulate this I'll send it to you.
I've not opened a report with MS about it.

In the db I'm working on it is 100% reproduceable, with all code
stripped out, except for a msgbox in the subdatasheet oncurrent. I can't
send anyone that db however.
 
Back
Top