Specified field Query Error

vbjohn

Registered User.
Local time
Today, 09:21
Joined
Mar 22, 2002
Messages
75
CODE:
strValues = "(((dbo_UPR00100MBR.EMPLOYID)='" & Me!txtMNumber & "'))"
DoCmd.OpenReport "YearEndStatement", acViewPreview, , strValues
END CODE:
-------------------------
ERROR:
it says that:
The Specified field 'dbo_UPR00100MBR.EMPLOYID' could refer to more than one table listed in the FROM clause of my Sql Statement.

-------------------------
which it isn't.

It works in my other Access programs that is why it is strange that I am getting this error. Any suggestions?

Attached is my picture of my query.
 

Attachments

  • accesserror.jpg
    accesserror.jpg
    95 KB · Views: 150
I can't tell from looking whether any of those items are queries. But if any one of them is actually a joined query and the table in question appears both in the main query and a sub-query, there is your ambiguity. Access ain't smart enough to know it is the same table.
 
You don't need the table name qualifier or three sets of parentheses.

strValues = "EMPLOYID = '" & Me.txtMNumber & "'"
 
Thanks..."The_Doc_Man" I tried on what you said to try and it works out great. Thanks for all your help!


John-:D
 

Users who are viewing this thread

Back
Top Bottom