Moving Global Variables Module results in "Compile error: Ambiguous name detected~ (1 Viewer)

Bilbo_Baggins_Esq

Registered User.
Local time
Today, 04:29
Joined
Jul 5, 2007
Messages
586
Moving Global Variables Module results in "Compile error: Ambiguous name detected~

I'm working on a friend's database that makes use of several common functions contained in a separate database.
There are a few seemingly irrelevant objects such as a few tables, a few reports, a single form.
The “meat” is contained in several modules.
This functions in these modules of the separate database are accessible by a reference to it in the working databases reference list.

The original database was a MDE but the retired developer has provided me with an non-compiled version so I can assist my friend with some upgrades and changes.
I have changed the reference from the old MDE to the replacement MDB.

I have been successful at migrating several of the functions from the reference source to the working database.
My successful process has been:
1. Create a new module in the working database
2. Paste function in the new module
3. Remove the function from the module in the original referenced source

However, there is a module in the original referenced source that is called “GlobalVars”.
This does not contain any actual functions, just a bunch of variable definitions.

I have followed the above steps with this “GlobalVars” module.

However, when I open the working database, I get the error:
Compile error:
Ambiguous name detected~

After I clear the error, a Form_Open function is highlighted in yellow with a variable “aScreenSize” highlighted in blue.
I have checked, and the aScreenSize variable is contained in the list of global variables.

Any ideas how to eliminate the error?
 

boblarson

Smeghead
Local time
Today, 02:29
Joined
Jan 12, 2001
Messages
32,059
Re: Moving Global Variables Module results in "Compile error: Ambiguous name detected

Somewhere within the program there is the same variable being declared in the same scope. Just do an EDIT > FIND and look for that same variable name in ENTIRE PROJECT and you should be able to find the duplicate and delete it.
 

Users who are viewing this thread

Top Bottom