Results 1 to 6 of 6
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    "Name conflicts with existing module, project, or object library" error

    Hi I'm having issues copying an existing form in my database. The form name is frm2020. When I copy it to paste a new one using the name "Copy of frm2020", I get the error "Name conflicts with existing module, project, or object library".

    When I change the name to something completely original, I get the error "The search key was not found in any record"

    Any ideas? Also, with this form that I'm looking to copy, it will not allow me to save changes I make to it. When it prompts me to save, pressing yes does nothing. Not sure if its related to this error message issue though

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,901
    Copying a form and its associated code should not cause this issue.

    If you want to provide db for analysis, follow instructions at bottom of my post.

    But why do you need copy of form? Why does form have a year in its name?
    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.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    If the form has any procedure or variable that begins with Public, you might get that error?
    The 2nd error is more common with spreadsheet imports where a column name begins with a space, so no idea when form copying is the cause.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Whilst I doubt it will be the issue here, that error is often caused by having a procedure with the same name as a module. That confuses Access and throws an error.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    That's what I was thinking but am probably wrong in thinking that if it was declared Private it shouldn't be an issue.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Quote Originally Posted by Micron View Post
    That's what I was thinking but am probably wrong in thinking that if it was declared Private it shouldn't be an issue.
    It is still an issue.
    The attached example has a startup form with a form load event which calls a private sub test in a module also called test.
    The error message is just the same as you get with a public sub or function

    Click image for larger version. 

Name:	Capture.jpg 
Views:	11 
Size:	56.9 KB 
ID:	42438 TV
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 2
    Last Post: 12-27-2016, 10:20 AM
  2. Replies: 1
    Last Post: 06-22-2016, 06:45 AM
  3. Replies: 0
    Last Post: 11-04-2015, 09:54 PM
  4. Replies: 3
    Last Post: 02-06-2015, 03:22 PM
  5. Replies: 1
    Last Post: 03-14-2013, 12:39 PM

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