Results 1 to 6 of 6
  1. #1
    sberti is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Nov 2012
    Posts
    33

    Crosstab error: Engine does not recognize <name> - no parameters


    Hi,
    I have a crosstab query that is giving me the error message:
    "The Microsoft Access database engine does not recognize 'h1.H1_Raft' as a valid field name or expression."
    The underlying query works fine.
    I don't understand this error, since I don't have a table or query called h1 and the field H1_Raft is not in the underlying queries.

    I have read that this error can happen if you need parameters defined, but neither this crosstab query or the query below it require parameters.

    Here is the underlying query:

    SELECT
    qryLocation_Present.Farm,
    qryLocation_Present.Site,
    qryLocation_Present.Row,
    qryLocation_Present.Position,
    qryLocation_Present.L_Position AS PresentLoc,
    qryLocation_Present.Raft,
    qryLocation_Present.MaxOfL_Date,
    qryRaftList_hatchery_ALL.CurGrams,
    IIf([L_Position]>0,IIf([Broodstock]=Yes,"BRD",IIf([SRED]=Yes,"SRED","PR")),"") AS Type

    FROM
    qryLocation_Present

    LEFT JOIN
    qryRaftList_hatchery_ALL

    ON
    qryLocation_Present.Raft = qryRaftList_hatchery_ALL.Raft;

    Here is my crosstab query:

    TRANSFORM
    Avg(qryLoc_ALL.Raft) AS AvgOfRaft

    SELECT
    qryLoc_ALL.Site,
    qryLoc_ALL.Position

    FROM
    qryLoc_ALL

    GROUP BY
    qryLoc_ALL.Site, qryLoc_ALL.Position

    ORDER BY
    qryLoc_ALL.Site, qryLoc_ALL.Position, qryLoc_ALL.Row
    PIVOT qryLoc_ALL.Row;


    Can anyone point me in the direction I should go to fix this?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    I presume your first query is called qryLoc_ALL. If this is the case it references qryLocation_Present and qryRaftList_hatchery_ALL - are there parameters in either of these two queries?

    Also Type is a reserved word which may result in a misleading error message - recommend changing it to a more meaningful description. At the very least, put square brackets round it which usually works. Or remove it all together since you ar enot using it in the crosstab

  3. #3
    sberti is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Nov 2012
    Posts
    33
    Thanks for your reply.

    There are no parameters in the underlying queries.

    I have changed the field name from "Type" to "RaftType". (I could not remove it since I have a 2nd query running off the query qryLoc_ALL that needs it.)

    I'm still getting this same error in the crosstab.

    I have tried making other crosstab queries using the query qryLoc_ALL as the basis and continue to get the same error. I even tried making one that does not include the field qryLocation_Present.Raft, which is the only field that contains the name "Raft" in it.

    This crosstab query used to work. I've been looking through the data for data errors, but don't see any. But I'm not quite sure what kinds of things in the data of a crosstab query can cause an error.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    Maybe the called query or a table it is based on is not native to the same database? The h1 could be a pseudonym for a db that cannot be found.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    are you sure you have not set any parameters - even if you are not using them?

    the other thing to do is to check (all) the query properties for sorting and filtering

  6. #6
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,784
    The problem may be here
    IIf([L_Position]>0,IIf([Broodstock]=Yes,"BRD",IIf([SRED]=Yes,"SRED","PR")),"")
    I suspect [Broodstock] and [SRED] are form controls. In that case, I believe a crosstab doesn't work if there's an underlying parameter that isn't explicitly declared. Try going to the underlying query(ies) and explicitly defining all such references in the query property sheet.
    Last edited by Micron; 10-27-2016 at 09:12 AM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 05-03-2016, 08:44 AM
  2. Replies: 2
    Last Post: 02-01-2016, 08:27 AM
  3. access database engine does not recognize
    By slimjen in forum Forms
    Replies: 8
    Last Post: 05-30-2014, 11:53 AM
  4. Crosstab Criteria or Parameters
    By lukewarmbeer in forum Access
    Replies: 3
    Last Post: 08-11-2010, 09:57 AM
  5. Replies: 1
    Last Post: 07-21-2009, 03:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums