Results 1 to 8 of 8
  1. #1
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149

    run-time error 2130


    I created several reports and ran well without error before, & I have not change them.
    But today, I run them again, it shows run-time error 2130 with message:
    The report name 'SaleReport' you entered in either the property sheet or macro is misspelled or refers to a report that doesn't exist.

    I can open the SalesReport and other reports in design view.
    It look OK.

    What can I do to fix?
    Thanks.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    from your post

    The report name 'SaleReport'
    I can open the SalesReport

  3. #3
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    I typed my report correctly, it is "SaleReport".
    The run-time error 2103 comes when running "OpenReport" command as below:
    DoCmd.OpenReport "SaleReport", acViewPreview

    When I edit the report in design mode, it shows properly.
    And it also correct in Print Preview mode.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Access does not lie, if it cannot find it, it is generally due to a typo.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    For the avoidance doubt suggest provide a screenshot of the navigation window showing the report

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Does every report have this issue?

    Could provide db for analysis.

    Sometimes weirdness is corruption that cannot be explained. Things to try:

    1. Compact & Repair

    2. Decompile then recompile

    3. import everything to a new db file

    4. reinstall Access

    5. rebuild reports
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    You can see what's in the reports collection
    Code:
    Sub ListReports()
        Dim rpt
        For Each rpt In CurrentProject.AllReports
            Debug.Print rpt.Name
        Next
    End Sub
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  8. #8
    uoghk is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jan 2022
    Posts
    149
    Thank moke123.
    using your code, i find that some of the report names are wrong, so Access cannot display the report in run-time.
    Because these report names are getting from a database table & someone changes these report names that i don't know.
    Thanks help for all of you.

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

Similar Threads

  1. Replies: 3
    Last Post: 04-06-2021, 06:25 AM
  2. Replies: 6
    Last Post: 02-03-2020, 07:09 PM
  3. Replies: 3
    Last Post: 01-23-2014, 07:49 AM
  4. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  5. Replies: 6
    Last Post: 05-30-2012, 12:32 PM

Tags for this Thread

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