Unexpected Export Error In Access 2019

User avatar
hlewton
PlatinumLounger
Posts: 3808
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Unexpected Export Error In Access 2019

Post by hlewton »

I have 2 identical Access files, 1 with the accdb database file extension and the other with the mdb database file extension. I always open up the one with the accdb file extension, make changes, and then export those changes to the file ending with mdb. You can see all the forms inside the red box on the left in the attachment. I made changes to all of them and was able to export them to the other database file with the exception of the form at the bottom named Print. That also is the first form that is opened when opening either of these databases. In the other red box, you can see the error message I get when trying to export the Print form. I am not sure what it means since I am doing exactly the same type of export as I did with all the other 8 forms.

I am sorry I couldn't make that error dialog box bigger because I had to shrink the entire attachment in order to upload it to here. It says:
You can’t delete the database object “Print” while it is open.
Close the database object, then delete it.


As I mentioned, I tried exporting this form the exact same way as I did the other 8 forms and I am not trying to delete anything, as far as I know.

How or what do I do to get around this error?

Thanks
Access Error1.jpg
You do not have the required permissions to view the files attached to this post.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78438
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Unexpected Export Error In Access 2019

Post by HansV »

What is the name of the form that is open in the screenshot?
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3808
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Unexpected Export Error In Access 2019

Post by hlewton »

HansV wrote:
31 Dec 2020, 19:42
What is the name of the form that is open in the screenshot?
Print is the name of the form that is in the screenshot. It opens when the file opens. I tried opening another form and then exporting "Print" but got the same error dialog box.
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78438
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Unexpected Export Error In Access 2019

Post by HansV »

Did you close Print before opening the other form?

By the way, why do you keep a .accdb an a .mdb with the same forms?
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3808
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Unexpected Export Error In Access 2019

Post by hlewton »

HansV wrote:
31 Dec 2020, 22:10
Did you close Print before opening the other form?

By the way, why do you keep a .accdb an a .mdb with the same forms?
No I hadn't done that. I just did close it now and that seemed to make it work. Why didn't it work when the other 8 did? Is it because it is the form that opens when this file opens?

I had been keeping 2 versions so that the computers that didn't have the latest version of Office on them (Still had Office 2003) would be able to use these files. That is no longer the case but, out of habit I guess, I have just continued to do that. Actually I created the original file using Office 97 and have updated the database file to the latest version quite a few times over the years.
Regards,
hlewton

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: Unexpected Export Error In Access 2019

Post by CData »

I wonder if 'Print' is a reserved word...you might look into that...

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Unexpected Export Error In Access 2019

Post by burrina »

Print is in fact a reserved word, so expect problems

User avatar
hlewton
PlatinumLounger
Posts: 3808
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Unexpected Export Error In Access 2019

Post by hlewton »

I had no idea what a reserved word meant so I looked it up and this is what I found.
"Reserved words" are words and symbols that have a specific meaning to Microsoft Access. If you use a reserved word or symbol to name a field in a desktop database or web app table, Access warns you that the word is reserved and that you might encounter errors when referring to the field.

It has been many years since I created this database and a lot has been forgotten, but I do not recall getting any warning from Access about naming that form "Print." It was back when I was using Office 97, I believe, or maybe Office 95, so maybe that would have made the difference in if I got a warning or not.

I am wondering, if I am reading the definition of reserved word correctly, it says if you name a field. I named a form so maybe that is the reason I didn't get any warning. Back when I created this I was still working and had access to many great programming minds for help. So had I gotten a warning, I'd have asked for help to get around it. But the fact remains that once I closed that form I was able to complete the export so maybe it does have something to do with it. It's confusing to me but that's nothing new.
Regards,
hlewton

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: Unexpected Export Error In Access 2019

Post by CData »

dependancies i.e. the number of other controls/objects that know it as 'Print'....consider changing it to frmPrint ...and then updating all dependent controls/objects

User avatar
HansV
Administrator
Posts: 78438
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Unexpected Export Error In Access 2019

Post by HansV »

@hlewton: that warning wasn't present in Access in Office 95 or 97, it has been added in a more recent version.
Best wishes,
Hans

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: Unexpected Export Error In Access 2019

Post by CData »

over the years the rules of the road do change....and equally important - the enforcement of the rules has been increased.....

User avatar
hlewton
PlatinumLounger
Posts: 3808
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Unexpected Export Error In Access 2019

Post by hlewton »

HansV wrote:
05 Jan 2021, 14:28
@hlewton: that warning wasn't present in Access in Office 95 or 97, it has been added in a more recent version.
Thanks Hans, I kind of suspected that. Is it because my form is named "Print" that I had to close it before I could export it to my other database?
Regards,
hlewton

User avatar
HansV
Administrator
Posts: 78438
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Unexpected Export Error In Access 2019

Post by HansV »

I suspect that you would have to close any form before exporting it.
Best wishes,
Hans

User avatar
hlewton
PlatinumLounger
Posts: 3808
Joined: 24 Oct 2010, 23:39
Location: Canton, Ohio USA

Re: Unexpected Export Error In Access 2019

Post by hlewton »

Thanks.
Regards,
hlewton