What does "Ambiguous name in a query expression" really mean?

timo1999

Registered User.
Local time
Today, 12:30
Joined
Aug 31, 2009
Messages
13
I am trying to write a cross tab query, with expressions that are saved as moduels in VBA form. Does this mean the expression is not recognized or possibly I have a syntax error?

You can view the attachment to see what I have on the screen. Thank you for your help in advance.:rolleyes:
 

Attachments

  • ambigouos.jpg
    ambigouos.jpg
    97.8 KB · Views: 492
The two that come to mind are:

1) If the query pulls from 2 tables and a field name exists in both, you'd get that error if you didn't specify the table (TableName.FieldName). That doesn't appear to be the case here, as I only see one table listed.

2) If you have a module with the same name as the function, or 2 functions with the same name, you might get that error.
 
You were right, I do have an older module name with the same exact name. What I did was change the name of "ConvertFraction" to "FracToNum" in the VBA code (that I did not write), but now I'm getting a new error that says, "Compile Error: Sub or Function not defined.

I do not know how to program VBA, but I do have a general understanding of it. I am attaching a new screenshot. Does this mean I have to use a predifined name, or add another line of code?
 

Attachments

  • define.jpg
    define.jpg
    96.3 KB · Views: 350
You were right, I do have an older module name with the same exact name. What I did was change the name of "ConvertFraction" to "FracToNum" in the VBA code (that I did not write), but now I'm getting a new error that says, "Compile Error: Sub or Function not defined.

I do not know how to program VBA, but I do have a general understanding of it. I am attaching a new screenshot. Does this mean I have to use a predifined name, or add another line of code?

Is FracToNum() Defined in a Common Module as a Public Function?
 
Yes, FracToNum is defined as a common module as a public function. You can see the code in the jpg I attached titled, "define"

If it is a reference problem, then I guess I am stuck, because I don't know VBA that well to check that. I will read the link you sent and hopefully try to gain a better understanding. Thanks for your help!!!! If you think of anything else, please let me know.

tim
 
OK, so I'm in the code, and I go to TOOLS;REFERENCES. The REFERENCES text is ghost text, and I can't click on it.:(

I can click on the other choices such as "Active X" "add-ins" ect.

I'm so close, yet so far...
 
OK, so I'm in the code, and I go to TOOLS;REFERENCES. The REFERENCES text is ghost text, and I can't click on it.:(

I can click on the other choices such as "Active X" "add-ins" ect.

I'm so close, yet so far...

You may have to first click on RUN > RESET
 
Tim

Can you post a copy of your mdb here or over on AccessForums (where I have been dealing with this issue for you for the past couple of weeks.)

David
 

Users who are viewing this thread

Back
Top Bottom