UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> The Module Name 'xxxxxxx' Is Invalid., Access 2013    
 
   
DanielPineault
post Jan 13 2017, 01:42 PM
Post#1


UtterAccess VIP
Posts: 5,452
Joined: 30-June 11



I'm performing a Copy/Paste of a form (which is closed at the time) within an unsplit db I am developing to simply speed up developing another form (like we all do!).
I am the sole user.
No orphan Access instance.

I keep getting attached error message. Anyone have any clues? Sometimes I change the name slightly and it will do it, then I go and manually rename it a 2nd time and it takes it. Other times I have to Cancel and try again. In all cases it does take the name, eventually.

I've tried decompile.
I've imported into a new blank db.

It happens on multiple dbs, so it's not db specific.
Attached File(s)
Attached File  1_13_2017_1_37_07_PM.jpg ( 56.84K )Number of downloads: 14
 

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
theDBguy
post Jan 13 2017, 01:54 PM
Post#2


Access Wiki and Forums Moderator
Posts: 71,230
Joined: 19-June 07
From: SunnySandyEggo


Hi Daniel,

I have never ran into this issue but then again I have never tried naming forms using the prefix "Form." It seems when Access initially pastes a form with a module, it can't do it when the name of the module will have the same prefix as the one Access uses internally, i.e. Form, Report, Module, etc.

Just a guess...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
DanielPineault
post Jan 13 2017, 01:56 PM
Post#3


UtterAccess VIP
Posts: 5,452
Joined: 30-June 11



I think you might be onto something. I normally remove the prefix, it is part of my template object only. I will test further.


Update:
I do believe you hit the nail on the head. I will simply rename the template objects to avoid this collision from occurring. An odd bug and one most people will never face (just me! crazy.gif )

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
theDBguy
post Jan 13 2017, 01:59 PM
Post#4


Access Wiki and Forums Moderator
Posts: 71,230
Joined: 19-June 07
From: SunnySandyEggo


PS. I just tried to copy and paste a form without a module but still got the same error. So, I guess it doesn't matter if Access also has to copy and paste code, it just won't accept it when the prefix is not allowed. My guess is probably Access creates a placeholder for the module somewhere, so the name still results in a conflict. Maybe...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
River59
post Jan 13 2017, 02:03 PM
Post#5



Posts: 1,347
Joined: 7-April 10
From: Detroit, MI


That's curious because I just renamed one of my forms to include the prefix Form_ in front of the name. When I attempted to copy/paste it just created a copy of Form_MyformName. This form also contains a module.

--------------------
Remember ... Armstrong, Aldrin and Collins flew to the moon and back with a computer system less complex than a modern, programmable toaster ...
Go to the top of the page
 
DanielPineault
post Jan 13 2017, 02:13 PM
Post#6


UtterAccess VIP
Posts: 5,452
Joined: 30-June 11



Yes, mine does that as well, but I deleted the copy of part because I didn't want that garbage (why Microsoft added this as part of their copy routine I'll never understand, so useless!!!!! pullhair.gif ). By doing so, I inadvertently set myself up to find this lovely bug. I admit it, it's all my fault! shrug.gif

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
GlenKruger
post Jan 15 2017, 12:14 PM
Post#7


Utterly Crispy UA Forum Administrator
Posts: 8,766
Joined: 29-September 01
From: Edmonton,Alberta,Canada


QUOTE
(why Microsoft added this as part of their copy routine I'll never understand, so useless!!!!! )


The answer is very simple the file etc... that you are copying can't have the same name in the same directory (folder).

--------------------
Human nature, it is a funny thing and the hardest thing to program to prevent.
Glen Kruger KNKConsulting
MS Access MVP 2013-2018| Wrox Techincal Contributor
Go to the top of the page
 
DanielPineault
post Jan 15 2017, 08:36 PM
Post#8


UtterAccess VIP
Posts: 5,452
Joined: 30-June 11



Yes, but if you remember back, there was a time where they didn't add the prefix 'Copy of', just the suffix part. Then, in someone's finite wisdom, they deemed that adding the 'copy of' prefix was somehow useful. So now, after performing a copy, you have 2 places to edit (prefix and suffix). It's neither here or there now, but just one more Microsoftism!

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
GlenKruger
post Jan 16 2017, 11:01 AM
Post#9


Utterly Crispy UA Forum Administrator
Posts: 8,766
Joined: 29-September 01
From: Edmonton,Alberta,Canada


Daniel are you not presented with a prompt asking to paste it as Copy of Module Name and can you not change the name to what you want?

--------------------
Human nature, it is a funny thing and the hardest thing to program to prevent.
Glen Kruger KNKConsulting
MS Access MVP 2013-2018| Wrox Techincal Contributor
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 09:51 AM