MS Access - Form fields do not appear in split database - database

I am having trouble deploying an access database into a multi-user environment.
I have split the database into front end and back end files. The back end file is on a shared network and the front end has been saved locally on the user's computer. I have checked that the tables are linked correctly and have had no problems opening the tables or viewing reports while using the front end file so I know the data is linked correctly.
My problem comes when I go to enter new information into a form while using the front end file of the split database. This form is intended for data entry only.
My form properties are currently set to:
Data Entry - Yes
Allow Additions - Yes
Allow Deletions - Yes
Allow Edits - Yes
Allow Filters - Yes
Record Locks - No Locks
When I open the form in form view, the form fields and command buttons do not appear, only the header of the form. However, everything does then appear when I switch to design view. When I changed the form property to “data entry – no”, the fields then appeared but I could only view existing entries and could not add any new entries.
I have not specified a specific "Date Mode" within my "open form macro" from my switchboard as I read it overrides the form properties and I am not sure where my error lies.
My client settings for my database are currently set to:
Default open mode - Shared
Default record locking - Edited record
Encryption method - Legacy encryption
This is my first time building a database so this is all still a learning curve for me and any advice is greatly, greatly appreciated!!
Thank you so much.

Related

Linking Base with precompiled Writer in libreoffice

I am facing this new challenge in Libreoffice mainly because I lack of expertise in using databases. This database links have been created on Microsoft Office but I am sure they work on libreoffice as well. What I need to do is to load the record from the database so that I can generate a new document with all fields retrieved from the database.
I have thus my file Database.odb where I have a table with 14 columns and 78 records. the table records are in text format, or date. When I open Writer, I click on the field, then "edit field", it prompts me with "error" and "General Error". I would click the first field as per logic and then ok, but once I close the edit field dialog the error keeps popping again.
I can further explain as I am sure I most probably have omitted important information, but I am sure this issue is an easy problem as all elements seem to be there but yet they need to be properly linked.

MS Access database trouble

I have an access database that has been used for many years, converted from Access 2000 to 2007 and was fine. In the last couple weeks it has been doing strange things!
There is a form for 'editing' a record. When the user clicked on the button to open this form, a small white box appeared and said 'Record Deleted'.
After that, the database was corrupted. I support this database and I can not even get into it in design view. When I try to open it (holding the shift key down while opening it), it takes a while, then it displays the Access design page that has the 'blank database' icon and to the right it lists the frequent opened databases.
So, I can't even get the to objects. The only option I had was to restore from a previous night backup. This meant the users lost all their work for the day. Today, one week later, it has happened again. All the users work was lost because I had to restore from backup.
I don't know where to begin to trouble shoot this since I can not get into it in design view when it has become corrupted. Looking for any suggestions to debug this. I can use a copy of the database I had restored.
Thanks
As a first and most important suggestion. You should split your database.You can do this from the database tools tab on top. By doing this you will have a seperate back end independat of the front end and your client will not loose any data as if they get the error / corrupted database it would not affect the data secured in the backend
Second I havent had the exact same error but in the past I have faced instances where the forms just dont work. a recommendation i read somewhere was to create a new blank form and copy over the elements from this form onto that and delete this form. I doubt if there is any problem with the VBA but it would be worth compiling the code to check.
Apologies if this does not help much, but I hope the first suggestions helps protect your client data in the instance your database crashes.
First, check if any automated VBA code or macro is running on OnOpen, OnLoad, OnCurrent, AfterUpdate, OnDirty, etc. events of the troubleshooting forms. Simply open the VBA window and look at code on the specific form's module. Or in the case of macros, open form in design view and check the Event tab of Property Sheet (and the same for specific buttons, textboxes, etc.). There may be DoCmd.RunCommands occurring when users interact with form controls.
Also, if you find yourself unable to open forms or deal with a corrupted database, consider beginning with a blank Access .accdb file and import all objects from the previous Access 2000 .mdb file. And if specific controls don't function properly, recreate them as needed.
As mentioned above, split your database between BackEnd (only tables) and FrontEnd (forms, queries, macros, modules) which prevents corruption, efficiently runs systems as only data is sent across the network and not whole application items, and overall fosters a better multi-user environment. Each user can have copies of the FE on their local machines but all will connect to one BE on a shared network. To help, Access 2007-2013 has a button for this on the Ribbon under Database Tools.

MS Access linked tables different for each user

I have a database that i have split into 3 pieces: a Front End, and two back ends that contain tables. Copying the front end to a users desktop cuts the runtime from 90 minutes to 30 minutes. However, when I move the back end to the desktop as well, the runtime is less than 8 minutes. The problem I am facing doing this is that I had to manually update the table links.
Is there a way to make it so that Access automatically updates the links based on what users computer it is on?
For example, I created a batch file to move the database files from the shared drive to a folder on the users destop using:
"%userprofile%\Desktop\Folder1\"
as the location to move the files to. "The "%userprofile%" automatically identifies the user and route the files properly. I didn't know if there was something similar to automatically update the links in Access.
Please let me know if you don't understand what I am trying to ask.
Assuming the 1st backend is on the user computer, and the 2nd backend is on the shared network, I think what you can do is create a qry upon opening the database to update the user's table, then after exiting, a 2nd qry that will export user's table back to the 2nd backend on the shared network. You'll have to add a field in the table so that your database knows which record to be added or to be exported.

Creating a custom column: "Append-Only" File Upload

I'm trying to make a custom column (for a custom list), where the users can upload files without overwriting the previous - this way they can keep past versions of the files and upload newer ones and the new ones append. There already exist "append only" comment columns and file upload columns that I can see.
I'm working with Sharepoint designer 2007 (2010 doesn't work with the site), and I'm referencing this code I found online somewhere (http://pastebin.com/raw.php?i=0qN89meu), trying to research the Sharepoint documentation on MSDN. I can open the site in designer, but don't know where to go from there (it's already running on a web server, not opening it locally).
I'm just not clear on how to start, I thought there'd be a simple "right+click -> new column" feature but I can't find it. If someone could point me in the right direction to where I could start creating columns on the site, that would be great. Thanks!
An untested idea :
Create a document library with a lookup column to the custom list.
Create an event receiver (ItemAdded and ItemUpdated) than will take the attached files and move them to the other list (with the correct lookup value). --> Code with Visual Studio
Grant to this document library only read permissions.
Adapt the view to display the related documents in the dispform of the custom list.
Advantages:
this seems to answer to your need
you gain all the usability of a document library (nothing prevent you to grant edit rights to other users, force check out, etc.)
Disadvantages:
you have to play with lookup. Can be tricky sometimes, if you play with features
you split one business entity to two entities. You will have to deal with cascading delete (if you need it).

Clearing Access Cache

I am developing a system in Access talking to a Sql Server backend. I can connect with two separate accounts A and B so that I can control permissions. In particular I have a view which is accessed via a pass through query which is denied to A but allowed by B.
Normally selection of A or B as the login is related to which Access Security Group the user belongs in, but I have set it up so that people in the Admins group (ie me) read the login from an internal access table. I have also created a form (and associated code) that allows an Admin to change this value.
This all works great and does its job perfectly - provided I start up Access from scratch.
It detects I am admin, reads the last value I set in the internal table, connects to the server with the correct login string (I loop deleting and re-creating all the tabledefs using this new connection string) and then displays my first form. I navigate to a button that runs the pass through query. When I click that button it recreates the pass through query, by deleting one with the same name and recreating it with the correct connection string (A or B login) before then running it to output results. If I am A, then it fails with a permission error (which I display and inform the user about), if I am B it works and I get the results.
I have added a system to attempt to change this on the fly for testing purposes. Having changed who Admin should login as (by writing to an internal table), it recalls the startup code, which loops through deleting and re-creating tabledefs and then puts me back at the intial form.
HOWEVER - If I now navigate to the button that runs my permission controlled query, it still deletes and re-creates the query def from scratch, but when I run it, it seems to run in the context of the SQL Server Login it set when I first started access, and not the new SQL Server Login I have just re-created everything with. So the query will run when it shouldn't (of visa versa).
If I exit Access and try again - it starts working properly again.
The only conclusion I can draw from this is that somewhere inside of Access it is caching the ODBC connection string - and instead of using the new one is using the old.
So my question is - is my conclusion correct, and if so how can I tell Access to clear its cache.
I am developing in Access 2010 - for a system that will ultimately be running in an Access 2000 environment - so the file format is an .mdb in the Access 2000 format.
I came to this topic because I had the same question: "How to clear the cache in Access 2010?"
In my case, the problem was that my application somehow "remembered" the entire path to my linked photos, even though I referenced only the file name. One of the links above lead me to search under "File > Current Database > Caching Web Service and SharePoint tables." The option to "Use the cache format that is compatible with MS Access 2010" was already checked, but I enabled the check box for "Clear Cache on Close" and closed the database.
Voila! All previously cached values, including the values for my linked photos, were cleared out. It doesn't appear that this setting affected my ODBC DNS-less connections, but I haven't confirmed this.
**TO CLEAR CACHING, go to File-->**OPTIONS-->Current Database, and scroll down to Caching Web Service and SharePoint tables.****
Can this page about ODBC linked access password reset be what you're looking for ?
As far as I know, there is no way to clear this cache. If you execute a query and supply a different UID/Password for that query, then the permissions you obtained from that act will remain in effect until such time you close down Access.
Thus if you execute another query and supply a "differnt" UID/password, and then later own execute another query with “lower” permissions, the other cached UID/password will be used. So you can (and will) have multiple UID/passwords cached at this point in time - you have no control over which one is used.
The only way around this would be to adopt a separate ADO query – this to my knowledge does not cache the credentials like when using DAO queries.

Resources