Disappearing event procedures

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sometimes while editing my forms the links from controls to their event
procedures gets broken unexpectedly. The procedure is still there in code,
but when I look at the "Event" tab of the property box there are no event
procedures listed and I have to restore the link to my code. I am using the
correct names and syntax; in fact if I choose the Code Builder it brings me
right to my prewritten code and then (with no editing) everything works fine.

I have not been able to determine exactly when or why this happens since I
usually don't find out until I am retesting the changes to the form and
suddenly the events aren't firing the code. It doesn't seem I am doing
anything that should affect the controls where this happens, since they are
not the ones I am editing.

Does anyone know what I am doing to make this happen and how to avoid it? I
use Access 2000 on Win 2000. Thanks.
 
K Dales said:
Sometimes while editing my forms the links from controls to their
event procedures gets broken unexpectedly. The procedure is still
there in code, but when I look at the "Event" tab of the property box
there are no event procedures listed and I have to restore the link
to my code. I am using the correct names and syntax; in fact if I
choose the Code Builder it brings me right to my prewritten code and
then (with no editing) everything works fine.

I have not been able to determine exactly when or why this happens
since I usually don't find out until I am retesting the changes to
the form and suddenly the events aren't firing the code. It doesn't
seem I am doing anything that should affect the controls where this
happens, since they are not the ones I am editing.

Does anyone know what I am doing to make this happen and how to avoid
it? I use Access 2000 on Win 2000. Thanks.

That seems odd, unless you're cutting and pasting the controls in
question. That can cause the event properties to be lost. Aside from
that, all I can think of is that it may be the operation of the Name
AutoCorrect option. If that is enabled, I'd disable it and see if the
problem disappears. Note that (a) that's just a guess, and (b)
disabling Name AutoCorrect won't magically fix those controls that have
already lost their event properties.
 
Thanks. I don't think it is happening when I cut/paste but I will be more
careful to check this now that I know that could happen. I do frequently
move/resize the controls on the form, but I doubt that would make them lose
their links to the code.

I do use Name AutoCorrect (though I didn't even know what it wasuntil your
post led me to the help file). Seems like a useful featutre that I will want
to keep on, though, if I can. I am not renaming any of the controls involved
or their underlying fields, though, so if this is causing the problem it
seems it would have to be a "side effect" of something else. Perhaps I can
log the Autocorrect activity and see what is happening.

The hardest part is this is a very sporadic thing and I haven't found how to
reproduce it has proven difficult for me to troubleshoot. Thanks for the
suggestions; at least I have a few things to go on.
 
Back
Top