query parameter

drstein

Registered User.
Local time
Today, 16:40
Joined
Mar 23, 2009
Messages
28
I modfied a query that includes a check for tr_code not = a certain value.
The following is the query:
SELECT [A3].P_NAME, [A3].P_ID, [A3].LAST_NAME, [A3].FIRST_NAME, [A3].PHONE, [A3].PHONE_EXT, [A3].[TR Code], [A3].SumOfCount, [A3].[Batch ID], [A3].Submitter, [A3].[Create Date], [A3].[TRC Category], [Reject Categories].Explanation, [A3].[Batch Size], [A3].[TR Code Description]
FROM ([A3] INNER JOIN Submitters ON [A3].Submitter = Submitters.racfid) INNER JOIN [Reject Categories] ON [A3].[TRC Category] = [Reject Categories].Field1
WHERE ([A3-X].[TR Code])<>38 And (([A3].SumOfCount)>9);

When I run the query, it is asking me to supply a [TR Code]. I have no idea why it would be asking for a [TR Code] value.
Can you suggest what I should look for to see why it wants me to supply a tr code value?

I am asking the question since I am new to working with access 2007.
 
When Access prompts you for a value, it is because the field/phrase involved does not have a value.

Sometimes you explicitly ask for a prompt eg [Enter StartDate] but often, it is because you have misspelled a field.

You say there is a check for tr_code, but the sql contains [TR Code] ...notice the difference..

I think your issue is here
([A3-X].[TR Code]). Do you have a table A3-X?

I strongly recommend that you adapt/adopt a naming convention for fields and objects that does not include spaces and special characters in those names.
 
Last edited:
It asks because it doesn't know it. So there is no such thing in either of the two tables, or it has a column name written in a different way. Besides, the table [A3-X] does not appear in any join. The looks of all this imply that this was handmade. This is the price for not using the query designer.
 

Users who are viewing this thread

Back
Top Bottom