Form VBA won't recognize me.controlname (1 Viewer)

mab9

Registered User.
Local time
Today, 12:33
Joined
Oct 25, 2006
Messages
63
I'm baffled on this. On one form in my database, the VBA has decided to stop recognizing all references to me.controlname, with control being the various controls on the form. I've gone through the other forms in the database & all are working properly but one. I can't find any property or setting that would be causing this. There also aren't any missing references. Any ideas?
 

Banana

split with a cherry atop.
Local time
Today, 10:33
Joined
Sep 1, 2005
Messages
6,318
What happens if you import everything into a new blank database with AutoCorrect off?
 

boblarson

Smeghead
Local time
Today, 10:33
Joined
Jan 12, 2001
Messages
32,059
Yeah, if it works on others but not on the one, I would suspect possible corruption.
 

mab9

Registered User.
Local time
Today, 12:33
Joined
Oct 25, 2006
Messages
63
It gives the same error:

The expression On Change you entered as the event property setting produced the following error: Member already exists in an object module from which this object module derives.
 

Banana

split with a cherry atop.
Local time
Today, 10:33
Joined
Sep 1, 2005
Messages
6,318
It usually means that there is already other procedure by same name... Is there?
 

mab9

Registered User.
Local time
Today, 12:33
Joined
Oct 25, 2006
Messages
63
Nope, I've double checked all the modules and forms. There aren't any duplicate procedures anywhere in the code.
 

boblarson

Smeghead
Local time
Today, 10:33
Joined
Jan 12, 2001
Messages
32,059
You don't by chance happen to have a field with the name of "NAME" that you are trying to use? That will screw things up royally.
 

mab9

Registered User.
Local time
Today, 12:33
Joined
Oct 25, 2006
Messages
63
You don't by chance happen to have a field with the name of "NAME" that you are trying to use? That will screw things up royally.

Nope, nothing of the like. Everything is named cb_controlname for the combo's, list_controlname for list boxes, etc.
 

Banana

split with a cherry atop.
Local time
Today, 10:33
Joined
Sep 1, 2005
Messages
6,318
I already mentioned it, but is AutoCorrect on?


If not, the next thing I'd try is to decompile it.

From a prompt:

(Adjust as needed for version)
Code:
C:\Program Files\Office\Office11\MSACCESS.exe /decompile <pathtoyourmdbfile>
 

boblarson

Smeghead
Local time
Today, 10:33
Joined
Jan 12, 2001
Messages
32,059
Well, I guess the next possible thing is to post the db, if possible.
 

mab9

Registered User.
Local time
Today, 12:33
Joined
Oct 25, 2006
Messages
63
Ah, this can be closed, I found the problem. I had renamed a button and in adjusting the code I accidently wiped out the _Click() suffix. Put that back in & everything is working again.
 

Banana

split with a cherry atop.
Local time
Today, 10:33
Joined
Sep 1, 2005
Messages
6,318
How odd. I'm pretty sure that forgetting to put in the suffix() shouldn't cause IDE to behave erratically as it did. Interesting, nonetheless, and will have to remember that one.
 

boblarson

Smeghead
Local time
Today, 10:33
Joined
Jan 12, 2001
Messages
32,059
How odd. I'm pretty sure that forgetting to put in the suffix() shouldn't cause IDE to behave erratically as it did. Interesting, nonetheless, and will have to remember that one.
No, that isn't just the () but on a click event you would need the _Click part as well as the () part.

Glad it is sorted. :)
 

Users who are viewing this thread

Top Bottom