Bogus 'Method or Data Member not found' message !?!

G

Guest

I just changed some code and went to compile my database
I'm getting an error 'Method or Data Member not found' on a reference to Me.txtJobStep. The value does exist, its even listed in the prompts when you enter Me
How can I get rid of this bogus error
If I remove that line, the error occurs on a nearby line

I am totally stuck on this project and can make no progress.
 
A

Allen Browne

Hi David.

Sometimes Access highlights the wrong part of the line, i.e. it is another
thing on the line that is the problem.

If that does not solve the problem, make a copy of your database file while
it is not running, and try decompiling. Enter something like this at the
command prompt while Access is NOT running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\My Documents\MyDatabase.mdb"

The compact the database, and try a compile again.

If that still does not solve the problem, try removing any references you do
not need. Unless you have special needs, you probably only need 3: the two
required ones (Access and VBA), and either DAO or ADO. More on referneces:
http://allenbrowne.com/ser-38.html

One final note: if the form is bound to a query or an attached table, and
your code refers to a field in the form's recordsource that is not
represented by a control on the form, try using a bang instead of a dot,
i.e.:
Me![MyField]
Occasionally that can unconfuse Access under those conditions.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

David said:
I just changed some code and went to compile my database.
I'm getting an error 'Method or Data Member not found' on a reference to
Me.txtJobStep. The value does exist, its even listed in the prompts when you
enter Me.
 

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