Criteria

  • Thread starter Thread starter margaret
  • Start date Start date
M

margaret

I have a query:

SELECT [qrygame companison cross-tab].game, gamemaster.gname, [qrygame
companison cross-tab].game, [qrygame companison cross-tab].DAYOFFAIR,
[qrygame companison cross-tab].[2008], [qrygame companison cross-tab].[2009]
FROM gamemaster INNER JOIN [qrygame companison cross-tab] ON gamemaster.game
= [qrygame companison cross-tab].game
WHERE ((([qrygame companison cross-tab].DAYOFFAIR)=[Day of Fair?]));

However, it keeps say it does not recognize "Day of Fair?" as a valid field
name or expression.

Any help would be appreciated.
 
Explicitly add it to the Query Parameters list.
I recommend you dump the question mark, but keep it if the above works.
 
Looks like [Day of Fair?] is a parameter. It also looks like this query is
based on a crosstab query. With the newer versions of Access, the data type
of a parameter must be declared when used by a crosstab. It's usually best
to put the parameter, and declare it, in a regular select query then base the
crosstab on this first query.

If you look at the SQL for this first query, it should have a first line
something like:

PARAMETERS [Day of Fair?] DateTime;

Even though the parameter is in the first query, it still ask for it when
you run the crosstab. However you have a third query based on the crosstab
and I've never tried that myself.
 
I assume that [Day of Fair?] is meant to be a parameter. That is the problem
with using spaces and other non-letter characters.
Add this above your SELECT statement in the query SQL --
PARAMETERS [Day of Fair?] DateTime;

So it looks like this ---
PARAMETERS [Day of Fair?] DateTime;
SELECT [qrygame companison cross-tab].game, gamemaster.gname, [qrygame
companison cross-tab].DAYOFFAIR, .....

NOTE -- I removed the second - [qrygame companison cross-tab].game,
 
Back
Top