Run time error 438: Object doesn't support this property or method

A

Anthony Dowd

Hi

I have a toggle button on a form (called Arthroscopy Form) which, when
pressed in, causes a command bar (menu bar) to appear. This command bar
contains a number of menu items which, when pressed, each call different
functions. The functions on the command bar control what appears in a text
box on the form. The actual functions are contained within a module.
Following is an example of such a function:
***************************************
Public Function ArthroLooseBodyTwo()
Forms![Arthroscopy Form]![LooseBody] = "Two loose bodies were removed."
Forms![Arthroscopy Form]![LooseBodyIndic] = "Loose body"
Forms![Arthroscopy Form]![ShowLooseBody] = "2"


Forms![Arthroscopy Form].Toolbar = ""
Forms![Arthroscopy Form]!Toggle100b = False

MyConcatenation (a function which performs a concatenation and has
nothing to do with the problem I'm having)
Forms![Arthroscopy Form]!LooseBodyIndic.Requery

DBEngine.Idle dbRefreshCache

End Function
********************************
So... when I press the toggle button, the menu bar appears. I click on one
of the menu items and the correct function is called. However, I get the
following error message: "Run time error 438: Object doesn't support this
property or method". When I click on the Debug button, the following line of
the above code is highlighted:

Forms![Knee Arthroscopy Form]!KALooseBodyIndic.Requery

This is kind of strange because I have a similar form which has a similar
set up and I've had no problems putting values in the text box when a menu
item is selected.

When the error message appears and I press the End button instead of
pressing the Debug button AND then when I close and reopen the form, I find
that the correct value has been placed in the text box. On the other
(similar) form which works fine, I can select any of the menu items on the
command bar and the value in the text box will update immediately with no
problems.

What am I missing?

Thanks in advance
Anthony
 
A

Anthony Dowd

Problem solved and it was so simple. I only needed to change the name of the
text box so it was the same as its reference in the function. Too many
things that can go wrong.

Anthony
 

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