Access 2000 question

  • Thread starter lemonysnicket73
  • Start date
L

lemonysnicket73

This is an Access 2000 question. I'm calling a macro from within a
subform on another form, and asking it to do something with that
subform. The manual says that if a macro affects a form, that form has
to be open. No problem--the button is on the form that I'm affecting,
so it has to be open.

However, I get an error which says that my form *isn't* open, and I
can't figure out why:

"The macro you are running (directly or indirectly) contains a
GoToRecord, Repaint Object, or SelectedObject action, but the Object
Name argument names an object that is closed. The object name
argument for the GoToRecord, Repain Object, or SelectObject method
names an Object that is closed. Use of the Open Action method to open
the object so that you can carry out the desired action."

Any suggestions? Thanks so much!
 
S

Steve Schapel

Lemonysnicket,

A form which is used as a subform is not open. The main form is open,
and the subform is contained within the subform control on the main
form. Therefore, if you are referring in your macro, whatever it is, to
the form which is contained in a subform, then the error message is
correct. However, you state that the macro is being triggered by an
event on the subform itself, and if so, in many cases there would be no
need to refer to the form in your macro arguments anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top