Solved Query Not working (1 Viewer)

NearImpossible

Registered User.
Local time
Today, 08:34
Joined
Jul 12, 2019
Messages
225
I have an access query built to pull a record from a SQL linked table, if it matches a value from a local table, however when I run the query, I am promted with Enter Parameter Value db_CurrentUser!UserName, which is the name of my local table and value I am trying to match.

If I manually enter the value that is sitting at db_CurrentUser!UserName, the query works, but it doesn't seem to find it on its own.

Any thoughts?
 

plog

Banishment Pending
Local time
Today, 08:34
Joined
May 11, 2011
Messages
11,646
Can you post the SQL of your query. My initial guess is that if db_Current!UserName is the name of your table it needs to have brackets around it in the SQL because of the exclamation point in the name.
 

NearImpossible

Registered User.
Local time
Today, 08:34
Joined
Jul 12, 2019
Messages
225
I figured it out while looking at the SQL text, I wasn't referncing the local table anywhere other than the "Where" clause.

I added it in and viola, it works.....
 

Users who are viewing this thread

Top Bottom