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
> Deleting Table Field With 'attachment' Data Type, Access 2016    
post Mar 25 2019, 11:44 AM

Posts: 1
Joined: 13-February 19

I had a problem, then fixed it, but I'm uncomfortable because I don't know why the fix worked. In my initial design, I included a field with the "Attachment" data type in my main 'deals' table (tblDeals). I later decided to delete this field because I figured it was not a good practice to start attaching PDF documents to my access database. Now with the field deleted, when I use a command button to open a deal entry form (which is bound to the deals table) from another form, I get the message which reads "The table 'tblDeals' is already opened exclusively by another user, or it is already open through the user interface and cannot be manipulated programmatically". Instead of figuring out the actual problem, I just added the Attachment field back to tblDeals and everything worked fine again. I changed nothing aside from the existence of that field. I resigned myself to just leaving it there and never using it in any of my forms or reports. This was fine until I tried to use Select * on tblDeals in an append query, which apparently doesn't work with multi-value fields (which I'm assuming the Attachment data type is multi value). So I deleted the Attachment field from tblDeals again, but actually had to figure out the problem that is prompting the "already opened" error message. As it turns out, frmDealEntry (again, bound to tblDeals) has the Record Locks property set to 'All Records'. Figuring that this could be causing a conflict with the form from which I've opened frmDealEntry (using a command button), I changed this property to 'Edited Record', and this seems to have fixed my problem. I'm now able to open frmDealEntry as designed and all is well, so I think. I've been able to replicate this problem on a small scale with a fresh database.

With all of that said I have 2 questions:
1) Why would deleting the attachment field cause this problem? Again, adding the field back in fixes the problem. It should also be noted that I've never actually attached anything to any record using this field.
2) Given that frmDealEntry had Record Locks property set to 'All Records', shouldn't I have received the error message even before deleting the Attachment field from tblDeals? In other words, why did it even work to begin with?

btw I'm brand new to access so let me know if something I've said is not making sense and I'll try again to explain.
I started developing this db in Access 2010. My software has since been upgraded to the 2016 version.

Go to the top of the page
post Mar 25 2019, 11:51 AM

Access Wiki and Forums Moderator
Posts: 76,084
Joined: 19-June 07
From: SunnySandyEggo

Hi Eric,

Welcome to UtterAccess!

Interesting scenario but it's hard to explain the why without being able to see your database. Glad to hear you're all sorted out though. Cheers!

Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    25th August 2019 - 10:31 AM