Cannot save modified form (1 Viewer)

reglarh

Registered User.
Local time
Yesterday, 20:28
Joined
Feb 10, 2014
Messages
118
I am using Access 2019 and made a modification to a form. The change was to modify an embedded macro that opened a second form.

When I try to save it I get the message:

Name conflicts with existing module, project or object library

I cannot understand why!
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:28
Joined
Feb 28, 2001
Messages
27,140
From this description, neither can we. Perhaps you tried to save changes to a form that was already open in Form View? Otherwise, the message is explicit: Something else is using a globally visible name associated with the something you tried to save.
 

Ranman256

Well-known member
Local time
Yesterday, 23:28
Joined
Apr 9, 2015
Messages
4,339
you cannot have public 2 functions with the same name
nor subs
Look to see if the code already exists.

You can overwrite forms/reports as long as they are not already open.
 

reglarh

Registered User.
Local time
Yesterday, 20:28
Joined
Feb 10, 2014
Messages
118
I was very tired yesterday when I posted my problem after an eternity trying to resolve it, and confused two things!

So, the problem cropped up when i tried to make a change in a form. The Excel data that I was using to populate a simple Access set of tables (exported from an existing application) had changed the field name of one of its fields. My form has a facility to click on one of the fields and then link to another form ad it was this field that had changed its name. I corrected this in the Open Form macro and all was working. I then tried to save the form, which appeared to work. I then closed the form and was asked again whether I wanted to save the changes. This should not have happened since the changes had already be saved. Clicking 'yes' did nothing and the form remained open. Closing the database resulted in me being asked once again if I wanted to save the changes to the form. Answering 'Yes' appeared to save the database, but when I tried to close Access I was yet again asked if I wanted to save the changes! The only way to exit was to say 'No'.

When I make significant changes to a Form, I always copy the Form, work on the copy and when finished remove the original and rename the copy back to the original name. Copying the problematic form produced the error I reported yesterday:

Name conflicts with existing module, project or object library

So I am stuck - a user waiting for the change which I just cannot complete. I have worked on this system for 8 years, starting on Access 2010 without a problem. This is the first change I needed to make on Access 2019.

Not sure if this gives more clues?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 04:28
Joined
Sep 12, 2006
Messages
15,634
I would say your form now has a corruption. Sometimes a form can become unuseable in there circumstances, so be careful. Do you have a backup? Generally I would delete/rename the form, go back to a back up, and import the last good version of the form, and try again.
 

Users who are viewing this thread

Top Bottom