Results 1 to 10 of 10
  1. #1
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error Message (A2002)

    Good morning,

    I have written a simple select query as follows

    SELECT tblExpressCourier.Country, tblExpressCourier.Weight, tblExpressCourier.Rate
    FROM tblExpressCourier
    WHERE (((tblExpressCourier.Country)=[Enter Country of Destination]) AND ((tblExpressCourier.Weight)=[Enter weight, i.e. 0.50, 4.00 etc.]));

    When asked to save it I have saved it as qryGetRate which it allows but when I click on it I get the following error message

    'qryGetRate' is not a valid name. Make sure that it does not include invalid charachters or punctuation and that it is not too long.

    I have re-written the query and named it qrygetrate, getrate but it still gives the same error message every time.

    Thank you

    Steve Hocking

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error Message (A2002)

    Select Tools | Database Utilities | Compact and Repair Database...
    If this does not remove the problem:
    Create a new, blank database. Import all objects from the database you are working on.
    Can you run the query in the new database?

  3. #3
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error Message (A2002)

    Thanks for the quick response Hans, however this was a new database this morning. I have deleted it run the compact database you suggested, made a new db and exactly the same happens, I have tried to compact the new one but it is no good.

    Any other advice would be appreciated.

    Thanks


    Steve

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error Message (A2002)

    Could you post a zipped copy of the database? You can remove most or all of the records in the tables, and you can remove all forms, reports and modules. (If this also removes the problem, there are new avenues to explore.) Compact the database before zipping it. The zip file should be below 100 KB

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Error Message (A2002)

    Can you save it with some other name? If not, it sounds like you could have some sort of Access installation problem.
    Wendell

  6. #6
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error Message (A2002)

    Hi Hans

    Thanks again for your quick response, please find attached the zip.

    Steve
    Attached Files Attached Files

  7. #7
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error Message (A2002)

    Hi Wendell

    Thanks for the response, I too fear that it may be corrupt because I have deleted the db and tried in again, luckily its in an emryonic stage so it was no fuss to do that. I have, as Hans kindly advised, attached a zip of the db for him to have a look at. I have probably done something glaringly stupid.

    Steve

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Error Message (A2002)

    Access pukes on the periods <big>.</big> in the second parameter [Enter weight, i.e. 0.50, 4.00 etc.]. If you remove these, the query runs without a hitch. So try [Enter weight with two decimals] as parameter.

  9. #9
    2 Star Lounger
    Join Date
    Sep 2003
    Location
    London, Gtr London, United Kingdom
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error Message (A2002)

    Thanks so much Hans, have a good weekend

    Steve

  10. #10
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Error Message (A2002)

    Good catch Hans! <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> I wondered about that briefly, but decided it should be OK - moral - never make assumptions.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •