For some reason, my database will not compile. I get an error message that says Ambigouos Name detected when it gets to the first call of a procedure out side the module that I am initially in. This didn't happen yesterday ?
When Access fails to detect a duplicate function name, it means the generated code is in bad shape.
One way to deal with this problem is to occasionally use the /decompile switch.
You can read about it on the internet; simply search for microsoft access decompile (or similar).
It also can make a significant reduction in size of your database.
One harmful side-effect I have noticed of decompile is that it may mess up type names with spaces.
For example, say you have a declaration such as
dim MyForm as [Forms_User Validation Form]
the decompile process sometimes removes the brackets. Simply put them back in.
Additionally, I have occasionally noted that decompiling changes a 'class' module into a regular module. Again, this is easily repaired by copying the code from the module into, say, the notepad, erasing the module, creating a new class module, and pasting the code back in.
However, the benefits of decompile (sometimes you are unable to access module code because the intermediate code has gotten fried) far outweigh the disadvantages, and I perform it frequently.
While I agree with Beetee on the /decompile switch, I'd like to re-give you some hope...your code might not be damaged (yet).
It's a duplicate declaration for sure. The reason may be that you created let's say a command button using the wizard, gave it a 'meaningful name', then deleted the button. After that you re-created it also through the wizard and gave it the same name. Access just duplicated the code without knowing it
Before deleting a control, make sure you first delete the code behind it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.