Results 1 to 4 of 4
  1. #1
    AndyK is offline Novice
    Windows 2K Access 2003
    Join Date
    Apr 2011
    Posts
    4

    Crosstab query using form criteria - invalid bracketing

    Hi



    Despite googling this and trying a few things, this is still driving me crazy!

    I have a cross tab query which is querying data based on a range of dates.
    If the query uses a popup each time (i.e [Enter start date] etc) the query works fine.

    However, what I want to be able to do is to take the date range from two calendar controls in a form.

    Problem is I keep getting "Invalid bracketing of '[Forms!]![frmMain]![byTeamStartDate]'".

    I read yesterday that the parameters need to be declared in crosstab queries. This I duly did and both are set as date/time formats

    [Forms!]![frmMain]![byTeamStartDate]

    and

    Forms]![frmMain]![byTeamEndDate]

    but the query still doesn't like it and thus I am tearing my hair out (as the majority of the rest of the database's queries will be similar).

    Grateful for any help!
    Thanks

    Andy

  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,521
    Take out the red exclamation mark:

    [Forms!]![frmMain]![byTeamStartDate]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    AndyK is offline Novice
    Windows 2K Access 2003
    Join Date
    Apr 2011
    Posts
    4
    Paul - thanks so much. Annoyed with myself I didn't spot that!
    Query working fine now

    thanks again

  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,521
    No problemo. I think it's human nature that once you miss something like that, your eye will continue to see it wrong no matter how long you stare at it. Happens to me all the time.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. crosstab query criteria
    By Sharron in forum Queries
    Replies: 3
    Last Post: 12-15-2011, 04:31 AM
  2. crosstab query (criteria does not work)
    By Rich P in forum Access
    Replies: 1
    Last Post: 02-15-2011, 11:40 AM
  3. crosstab query (criteria)
    By Rich P in forum Queries
    Replies: 1
    Last Post: 02-14-2011, 08:40 PM
  4. Form's Criteria used in Crosstab
    By onechriswhite in forum Queries
    Replies: 8
    Last Post: 08-27-2010, 05:48 PM
  5. Criteria in Crosstab Query
    By wasim_sono in forum Queries
    Replies: 1
    Last Post: 12-12-2006, 05:14 AM

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