• Invalid query names (Access 2000 SR-1)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Invalid query names (Access 2000 SR-1)

    Author
    Topic
    #393768

    I’ve started getting the following error message with my Query names:

    ” ‘Query name’ is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.”

    Strangely, this message pops up after I’ve already saved the Query under the now invalid name. I’ve tried changing the name to a single letter or a default name like Query1, but the error message persists.

    Thanks,
    Bob

    Viewing 3 reply threads
    Author
    Replies
    • #716569

      Give us an example of the query names that have prompted this message. And post a sample of the SQL for one of these queries.

      • #716615

        Here are two:

        *********************

        Name (First query): Archive Selected Records

        SQL (First query):

        INSERT INTO [CorrectionCRs Archive]
        SELECT CorrectionCRs.*
        FROM CorrectionCRs
        WHERE (((CorrectionCRs.CorrDate) Between [Starting archive date.] And [Ending archive date.]))

        Name (Second query): Delete Selected Records

        SQL (Second query):

        DELETE CorrectionCRs.*, CorrectionCRs.CorrDate
        FROM CorrectionCRs
        WHERE (((CorrectionCRs.CorrDate) Between [Starting deletion date.] And [Ending deletion date.]));

        *********************

        The queries do work at the beginning, but if, for example, I make a small change in the wording of a parameter query, the error message starts appearing.

        Thanks,
        Bob

        • #716896

          That’s an odd error you’re getting – there’s nothing “invalid” about the query names you’re using (not too long, no illegal characters, etc). By any chance do you have the Name AutoCorrect feature enabled? This so-called “feature” is responsible for all sorts of wierd errors. See this MSKB article:

          Name AutoCorrect Does Not Repair Query Field/Table Names

          One possible cause for errors is cited as: “The query is an action query, such as an update or append query, and the field that was changed is in an output column.”

          I don’t know if this applies to your problem, but may be worth checking out. If you are using Name AutoCorrect, I’d strongly recommend turning it off, although SR-1 supposedly fixed some of these problems. Otherwise have no clue on reason for error.

          HTH

        • #716897

          That’s an odd error you’re getting – there’s nothing “invalid” about the query names you’re using (not too long, no illegal characters, etc). By any chance do you have the Name AutoCorrect feature enabled? This so-called “feature” is responsible for all sorts of wierd errors. See this MSKB article:

          Name AutoCorrect Does Not Repair Query Field/Table Names

          One possible cause for errors is cited as: “The query is an action query, such as an update or append query, and the field that was changed is in an output column.”

          I don’t know if this applies to your problem, but may be worth checking out. If you are using Name AutoCorrect, I’d strongly recommend turning it off, although SR-1 supposedly fixed some of these problems. Otherwise have no clue on reason for error.

          HTH

      • #716616

        Here are two:

        *********************

        Name (First query): Archive Selected Records

        SQL (First query):

        INSERT INTO [CorrectionCRs Archive]
        SELECT CorrectionCRs.*
        FROM CorrectionCRs
        WHERE (((CorrectionCRs.CorrDate) Between [Starting archive date.] And [Ending archive date.]))

        Name (Second query): Delete Selected Records

        SQL (Second query):

        DELETE CorrectionCRs.*, CorrectionCRs.CorrDate
        FROM CorrectionCRs
        WHERE (((CorrectionCRs.CorrDate) Between [Starting deletion date.] And [Ending deletion date.]));

        *********************

        The queries do work at the beginning, but if, for example, I make a small change in the wording of a parameter query, the error message starts appearing.

        Thanks,
        Bob

    • #716570

      Give us an example of the query names that have prompted this message. And post a sample of the SQL for one of these queries.

    • #716935

      From the example you posted it appears you have spaces in the query name. If that is so, I think you would need either [ ] or ” ” around the name.

    • #716936

      From the example you posted it appears you have spaces in the query name. If that is so, I think you would need either [ ] or ” ” around the name.

    Viewing 3 reply threads
    Reply To: Invalid query names (Access 2000 SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: