Results 1 to 4 of 4
  1. #1
    Buakaw is offline Absolute novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    112

    Debugging help

    Hi,


    When I try to click on a query I get this error message:

    Invalid bracketing of name '[Forms!fmnuReportSelect!cboSrvID]'

    I compared the SQL code with the clean version (which runs without a bug) and there was no difference. I am at a loss of how to continue debugging this.

    Can someone give me some tips on how I can debug things like this? Thanks.

    This is the SQL code of the query.

    Code:
    PARAMETERS [[Forms]!fmnuReportSelect![cboSrvID]] Long;
    TRANSFORM Count(tblResponses.Rspns) AS CountOfRspns
    SELECT tblSrvRspns.RspnsName, tblQuestions.QstnID, tblQuestions.QstnLvl1, tblQuestions.QstnLvl2, tblQuestions.QstnLvl3, tblQuestions.QstnText, tblResponses.Rspns, tblQuestions.SrvID
    FROM tblSrvRspns INNER JOIN (tblQuestions INNER JOIN tblResponses ON tblQuestions.QstnID = tblResponses.QstnID) ON tblSrvRspns.RspnsID = tblResponses.RspnsID
    WHERE (((tblQuestions.SrvID)=[Forms]![fmnuReportSelect]![cboSrvID]) AND ((tblResponses.RspnsID) Like [Forms]![fmnuReportSelect]![cboRespondant]))
    GROUP BY tblSrvRspns.RspnsName, tblQuestions.QstnID, tblQuestions.QstnLvl1, tblQuestions.QstnLvl2, tblQuestions.QstnLvl3, tblQuestions.QstnText, tblResponses.Rspns, tblQuestions.SrvID
    PIVOT "Number of Responses" In ("Number of Responses");

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    I think it should be:

    PARAMETERS [Forms]!fmnuReportSelect![cboSrvID] Long;
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Buakaw is offline Absolute novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    112
    Quote Originally Posted by pbaldy View Post
    I think it should be:

    PARAMETERS [Forms]!fmnuReportSelect![cboSrvID] Long;
    Thanks, that seemed to do the trick. But I don't understand why because what I pasted was in the original clean copy and it works.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    I've never seen it that way, but it wouldn't be the first time something like that surprised me. Glad you got it working in any case.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

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