Invalid bracketing of parameter name

Access Discussion in 'Microsoft Office' started by Steffa67, Jan 11, 2018.

  1. Steffa67


    Jan 11, 2018
    Likes Received:
    I am trying to pass a parameter from a form to a query. I have used the wizard function, so the bracketing was created by the wizard.
    SELECT Input_GENERAL.[Name], Input_GENERAL.[AP]
    WHERE (((Input_GENERAL.[AP])<[Forms]![frm_RunReport]![txt.RptEndDt]));

    When I run the query, I get the error Invalid bracketing of name [Forms]![frm_RunReport]![txt.RptEndDt]. I cannot understand how this is happening when the syntax was created by the wizard. The fields AP and the parameter txt.RptEndDt are both short date.
    Steffa67, Jan 11, 2018
    1. Advertisements

  2. Steffa67


    Mar 14, 2018
    Likes Received:
    Is your field name really called txt.RptEndDt. The problem is the period in your field name. Field names should never have a period in them. The wizard puts in brackets around field names in case you field name has a space in it, if it doesn't you don't need the brackets.
    msbad, Mar 14, 2018
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.