Error message

  • Thread starter Thread starter RipperT
  • Start date Start date
R

RipperT

I have a sub form on a main form and when I tab through the main form and
onto the first field in the subform, as soon as I press a key to type
something in the field, an error message pops up:

Object or class does not support the set of events

I click OK and the form lets me continue entering data in all fields
without errors and go onto the next record without errors. The main form
and many has form and control events, but the subform has no code
associated with it. Where is this error coming from?

Many thanks.
Rip
 
This sounds like an error with and ActiveX control, or a library reference,
or a bad procedure, or bad VBA binary.

Are there any non-Access controls on the form? Perhaps a graph? Or a
calendar control? If so, remove it and see if the error dies.

If that doesn't solve it, open the form's module. Go to the General
Declarations (top, typically Option statements.) Make sure you do have the
line:
Option Explicit
In the right-hand drop-down, look at the procedure names. Are there any
there that are not associated with a control? Should they be there? Do they
have the same name as an event procedure but the wrong arguments (e.g.
Form_Open without the Cancel As Integer)?

To check the library references, choose References on the Tools menu (in the
code window.) Remove anything you don't need. If you are not sure what you
need, this list addresses the core libraries for each version of Access:
http://allenbrowne.com/ser-38.html
Then choose Compile on the Debug menu, and deal with any errors you see.

Still stuck? It's time for a generic recovery sequence to remove any bad
binary, Name AutoCorrect mis-assignments, and so on. Follow these steps
through in order:
http://allenbrowne.com/recover.html
 
I tried all the steps you mentioned including recovery sequence without
success. I was mistaken in my original post in that the error repeated
itself with each new record on the subform, but it still allowed me to
enter data in all fields and save the records. Wierd. Anyway, since I was
early on in the design of this particular subform, I destroyed it and
started anew. That seems to have eliminated the problem. Many thanks for
your assistance.
Ripper
 
Back
Top