Current Event does not fire with disabled columns

  • Thread starter david epsom dot com dot au
  • Start date
D

david epsom dot com dot au

A2000. If I disable all of the controls on a form, in DataSheet view the
form current event /may/ not fire. Typically, clicking down the list I can
get a current events for each of the records shown, then when I start going
back over the records again (using the record selectors), I don't get any
current events at all.

Worse, it is fairly unpredictable. Worse in a subform: Worse if I use the
record selectors or navigation buttons: Worse if I freeze a column.

Worse, I'm having problems even if some of the controls are NOT disabled.

I've tried a couple of forms in a couple of databases on a couple of
machines.

I've solved my problem by enabling all the controls on the subform, and
setting the form Allows Edit property to false, but I'm not pleased. I don't
want to guarantee that my subforms will /never/ have a disabled control, and
having just one enabled control isn't enough to be sure that it will work.
Is there a magic number of disabled controls? It doesn't seem likely. And
having an event that randomly fires 'sometimes' is worse than having no
event at all.

And the guy that designed that form had disabled controls because he /liked/
it that way: disabled controls won't take focus, which is slightly different
to the effect you get by changing the 'allow edits' property.

Can anyone else reproduce these problems? Was it fixed in A2002/A2003 ?

(david)
 
M

Marshall Barton

david said:
A2000. If I disable all of the controls on a form, in DataSheet view the
form current event /may/ not fire. Typically, clicking down the list I can
get a current events for each of the records shown, then when I start going
back over the records again (using the record selectors), I don't get any
current events at all.

Worse, it is fairly unpredictable. Worse in a subform: Worse if I use the
record selectors or navigation buttons: Worse if I freeze a column.

Worse, I'm having problems even if some of the controls are NOT disabled.

I've tried a couple of forms in a couple of databases on a couple of
machines.

I've solved my problem by enabling all the controls on the subform, and
setting the form Allows Edit property to false, but I'm not pleased. I don't
want to guarantee that my subforms will /never/ have a disabled control, and
having just one enabled control isn't enough to be sure that it will work.
Is there a magic number of disabled controls? It doesn't seem likely. And
having an event that randomly fires 'sometimes' is worse than having no
event at all.

And the guy that designed that form had disabled controls because he /liked/
it that way: disabled controls won't take focus, which is slightly different
to the effect you get by changing the 'allow edits' property.

Can anyone else reproduce these problems? Was it fixed in A2002/A2003 ?



Gee, David, you sure come up with some tough ones ;-)

I can confirm (A2002) that the Current event does not fire
consistently in a datasheet form with **all** controls
disabled. It appears that the Current event is triggered on
the first record when the form opens and on any record
navigated to from the first record. But, it does not fire
for any record after that.

In my simple test, it does seem to fire properly when at
least one control can receive the focus.
 
P

Paul Overway

Did you try leaving the controls enabled but locked? And maybe tab stop no?
Why are you disabling the controls anyway?
 
D

david epsom dot com dot au

Why are you disabling the controls anyway?

Disabled controls so that the values can not be edited:
Form Allow Edits enabled so that a check box could be
selected and cleared: Frozen column so that the natural
key remains visible while scrolling sideways: Not
locked so that the controls are clearly not editable:
Not tabable because the controls are disabled.

My new main form now has one sub-form where the controls
are enabled but Allow Edits is false, (so that a current
event fires) beside a matching subform where Allow Edits
is True but most of the controls are disabled (no current
event, but allows use of a checkbox).

Apart from the fact that I've wound up with the subform
controls containing different forms (I used to have just
one form loaded separately in each control), there is
an aesthetic irritation as well: the two subforms now
look different from each other in a subtly misleading
way.

(david)
 
D

david epsom dot com dot au

Thanx.

The one thing worse than an unpredictable feature is
an unpredictable feature that only one person can
see :~)

(david)
 
Top