Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange errors 3

Status
Not open for further replies.

striker73

MIS
Jun 7, 2001
376
0
0
US
Lately I have been getting some strange errors on different forms in my database. It seems like I make one small change that Access doesn't like, so I get this bizarre error that doesn't go away by changing the code back to its original state or closing the program. (I haven't tried restarting my computer.) The only way I can get rid of the error is to create a new form, copy all my controls to the new form and copy my code to the new form.

The error usually says something like: "The expression OnLoad you entered as the event property setting produced the following error: Member already exists in an object module from which this object module derives. The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]. There may have been an error evaluating the function, event or macro."

Has anyone else encountered something similar to this and been able to get around it? Let me know. Thanks!
 
Have you tried compacting & repairing the db, because it sounds as if it is on its way out...

It might be a good idea to import the entire db into a clean db... James Goodman
 
Just gone through this agony. There is a MS KB article Q279124 that states that you cannot have variables in your VBA code with the same name ascontrols on your Access forms. Also, it appears that your variable names also cannot conflict with recordset column names. Remove your VBA code and systematically replace sections of it until you can isolate the variable name(s) in conflict. HTH
 
MinerJ,

Nice stuff. I'll try to give you a star when I'm at a computer that's not running popup killer.

One -more- reason to use a naming convention. I've never run into this because my controls and variables could never have the same name because of the version of hungarian that I use.

Jeremy =============
Jeremy Wallace
Designing, Developing, and Deploying Access Databases Since 1995

Take a look at the Developer's section of the site for some helpful fundamentals.
 
Hey Miner J ... this is an old post, but I just ran into this problem. Thanks for the insight. Have a star!

- Jedi420

A man who has risked his life knows that careers are worthless, and a man who will not risk his career has a worthless life.
 
the knowledge base article has now changed to ACC2000 but you can still find it by searching the Article ID: 279124

this was cool ... thanks Miner J. it helped me ...

Dougal
"Sentio aliquos togatos contra me conspirare."
(I think some people in togas are plotting against me.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top