ms-access: breaking up front and back end - ms-access

i have an access database on a server. it is split up into front end and back end.
people are accessing the database's front end using a shortcut from their desktop computers.
i know for a fact that multiple people are using it at the same time.
for some reason, when i created a shortcut on my computer to access the front end of this database, i can open the file no problem, but if i try to view any tables or forms i am getting:
could not use .....file; file already in use
what does this mean?

I'm unsure what your error message means specifically. I don't understand why Access would open the database file without complaint, but then spit an error when you attempt to view forms or tables. I've never encountered that situation.
However, in a general sense, I think it means you should give each user their own copy of the FE database file ... instead of allowing everyone to directly open the same FE file on a network share.
Use Tony Toews' free Auto FE Updater to manage the distribution of the FE files to your users. Then you can replace the existing desktop shortcuts with a shortcut to Tony's utility. It's a slick way to ensure all the user's have the latest version of your FE, and by giving them their own copy avoids the problems inherent in allowing everyone to directly open the very same FE database file.
Also, read this page from Tony for more detailed information: Splitting your Microsoft Access MDB into a front end and back end - Why?
Edit: Perhaps the error message is because a user has the BE database opened exclusively. They wouldn't need to open it in that mode, but when modifying a back end object, like a table design, Access will switch them to exclusive mode. However, if this were the explanation, it seems like everyone except the exclusive user would be getting the same error message as you. Are they?

Related

Run-time error '3328' table is read-only

Hi i am working on access 2007-2013 application with DSN-less linked, the application is working perfectly, but when i shared it with other users i am getting the following error
Run-time error '3328' table is read-only
i tried to enable the active x component in the application under options then go to trust center, and check [Never show information about blocked content]
also i noticed that when one user open the application the other user get this message
Could not lock file
how can i solve this issue? i know i have to go to do something under options, but what?
thank you
Like #AVG said, you're going to need split architecture.
This has to components:
Back End
This is where all of your tables will be stored. It is just another Access database, without Forms/Queries/Reports/Modules.
Front End
This is where you are going to Link to your Back End, and this WILL contain Forms/Queries/Reports/Modules, and create linked tables as well.
You're going to distribute this Front End to all of your users to solve these concurrency issues you're facing (people are editing records/viewing data and others are trying to write to that table and do other things at the same time, which Access doesn't like).
The Back End needs to be in a location where everyone has access to it.
I think in your question what you're asking for, would be this, but splitting the front end and back end is by far the best route to go. Simply turning off the security checks Access has in place to protect your data isn't advised in the least. It also helps reduce bloat.
For disabling record locks : Click the top left Office Button, Click Options, Click Advances. Select No Locks.

How to get access to a locked MS Access database

I have a multi-user split access DB with a front end and back end on a network drive. I often need to make structural changes to the back end of the database but the file is always locked due to the frequent use of the file by many users and the fact that nobody seems to be able to close the file when they are finished with it.
When I need to modify the file I have to contact IT to kick everyone out of the file from the server which is a real pain.
I've tried things like coding an auto close timeout on the FE and a few other vba methods but over time there will always be something that causes the FE to hang or something before running the necessary code leaving the BE locked.
Is there any way to get access to the file without needing access to the Server settings?
Unfortunately, no.
Unless you implement a listener on the FE that looks at a flag on the BE and closes the FE when the BE flag is set (it sounds as if you've tried something like that), there is no way to do what you want. You can't even open the BE exclusively unless there are no other users. This is just one of the reasons that Access is not really a preferred multi-user DB solution.

Access 2010: Can't access query after splitting DB

I split my DB and now when I try to change some information on a few queries, I can't access them. I have a front end and a back end and understand that I should make changes to queries/forms via the front end, but they are grayed out and inaccessible.
At this point, I tried unsplitting the DB (which I believe I did), but I still can't edit those queries or forms.
I can click on the query/form and see the result of it, but I can't get to design view to edit it.
I'm taking a shot in the dark and saying that in the process of splitting your database, you either created your front-end in an accdr or accde format (a runtime application). The purpose of this is that you shouldn't be able to open queries or forms or tables in design view on the front end. You can just open your database and save it again as an accdb file and continue as normal.
If you're having other problems with the linked tables, I suggest you open the Linked Table Manager and refresh the links (if you moved the backend file, this is necessary).
I would recommend trying to proceed as normal by using Shift Bypass just to be sure. ( Hold the shift key when you start the database. Then attempt to modify in design view).
If these fail, I would attempt to copy the queries and /or forms if possible and create new ones.

how to open a mdb file, that is already opened by some other user?

I have created an Access file with forms and report and put it in a shared drive with full access rights. But when one user open the Access file, another user can not open the file. He clicks on the file, but no response comes... while I, at the server, am able to open it at anytime.
I am stuck. This Project is for all the users, all of them need to access the mdb file at the same time. How could it be done.
I have a lot of hope. Hope you guys help me out.
Thanks in advance.
Use the database splitter wizard to split your database into separate front end and back end components. Your forms and reports should remain in the front end. And the back end should contain only tables, indexes, and relationships. In the front end, your "tables" will actually be links to the back end tables.
Then use Tony Toews' Auto FE Updater (http://www.autofeupdater.com/) so that each user will work from their own copy of the front end database.
The approach that you're using now ... allowing multiple users to directly open the same mdb stored on a network share ... is asking for trouble. In addition to the problem you're seeing now, that approach dramatically increases the risk of database corruption. Don't do that!
Maybe one of your users is now opening the file in Exclusive mode?

Don't have exclusive access to database and so cannot save changes

I'm working on a MS Access database. I've made some changes to one of the modules. I want to go out for lunch, but when I try closing the database, I get the following message:
"You do not have exclusive access to the database. Your design changes cannot be saved at this time. Do you want to close without saving your changes?"
I'm pretty sure nobody else on the network has the database file open, and I don't have any other Access databases open. I'm probably missing something obvious, but would really appreciated some help!
Update:
In the end I copied all the code, closed the database without saving, re-opened it and pasted the code back in. I was then able to save the database. I'm not sure if this was a one off, but I'll report back if it happens again.
If you're sure no one else is in the db but you, it's an additional connection to your db from your own pc. You can verify this with the LDB viewer, downloadable in the free JetUtils.exe download from Microsoft:
http://support.microsoft.com/kb/176670
Look through your code and check if you have two separate database objects in the default workspace or another database object in a separate workspace. That will cause this problem.
To fix it, make sure the database objects are set to nothing before they go out of scope, and if you opened the database object in code, you also need to close it before setting the database object to nothing.
=============================================
Update in August 2022:
The MS link above no longer works. The document remains available on Archive.org, but is outdated. A document that appears to provide the current version of its information is at:
https://learn.microsoft.com/en-us/office/troubleshoot/access/determine-who-is-logged-on-to-database
This provides VBA code for a sub to obtain a list of users. The writer of this update has tested that code successfully in Access 2019.
If you close the database and are sure nobody else has it opened, check to see if there is a .ldb file (it will have the same name as your database file). If the file is there, then there is a good chance it is still in use.
Is it being access by a service, like a website?
You could copy the database to another sub-directory and make your changes. If that doesn't work, I will have to look that up. Of course there is always the database tool, "repair and compress database..."
Is the file located on a file server? If so check to see if any users have a file handle to it.
If it still doesn't work, update your post with your new information and we'll go further.
UPDATE (9/26):
Another thing I do when having strange issues with access databases with contain vba code is decompile. I don't know if this is documented yet, I haven't looked in years, but it's was (at least) an undocumented switch to msaccess.
From a cmd line:
change directory to where msaccess.exe is located.
Run the following command
msaccess \path to access file\databasefile.mdb /decompile
usually runs very quick then opens the database. Open any module and compile.
Doesn't always work, but sometimes can remove strange happenings.
Did you ever trying to copy the database to another directory and making your edits? That should of worked; you could then rename the original and copy the file back.
Anyway, I am glad you are working again.
If even a word mail merge is linked to the access database, that counts as an access connection.
Very simple.
Close all of your MSaccess files.
Open task manager (by right click on task bar).
Select Processes tab in that.
If the list has a msaccess*32 process close that by clicking on End Process.
This worked for me. I think it closes all the recordset which we have not closed in the codes or which is closed forcefully.