Relink Backend File Using VBA With Password Protected File
Nov 5, 2013
I have a code to relink a 2 backend files at start up. The problem is one of the files is password encrypted.
Code to input the password?
Dim dbsTemp As Database
Dim strMenu As String
Dim strInput As String
' Open a Microsoft Jet database to which you will link
' a table.
Set dbsTemp = CurrentDb
[Code] .....
This part is calling the password protected database
Just as the title describes, I can't seem to find a solution to be able to link the front-end to the back-end tables through the common file dialog when the backend is an accdb file that is password encrypted.
See the example attached. Here it should work just fine per the Article at :
http://support.microsoft.com/kb/181076
I've found it works fine without a password encrypted back-end but not with a password encrypted back-end.
Anyone have any ideas? It would be nice to use this feature in Access as well as automating the relinking.
Hi All, I have three excel files (ActualHires.xls, ActualPromotions.xls and ActualSeparation.xls). These are password protected files (with the same password). They are linked to an access database and whenever the files are opened, one must supply the password and click the 'Enable automatic refresh button.' What I was wondering was if this could be done in access with a command button. I have pasted some code below that I found but now I'm getting an error. This is the code:
For B = LBound(BookNames) To UBound(BookNames) WorkBooks.Open FileName:=BookNames(B), _ UpdateLinks:=3, Password:="*******" WorkBooks(B).Close SaveChanges:=False Next B
But when I click the button, I get this error: Run-time error '9' Subscript out of range.
and this line is highlighted: WorkBooks(B).Close SaveChanges:=False
I have to do this and I believe there is VBA code to re-link tables when needed that can be found on the web. My client needs access to everything because he will move on to another developer after this, so what I thought I would do is send him a private file that has the password for the backend and then just write the ADO code needed in the app's front end to connect with the password.
Firstly thank you for your help, this should be a simple one I hope, but is cracking my head on the wall. Have searched and searched and can't find an answer.
I have an Access Db that is not password protected, but is asking for a password. It opens on any other machine fine?
I think my version of Access is playing funny buggers with me, any suggestions?
I was trying to implement some security on this Db, which is why it happened I'm sure. I ran the security wizard, set-up two users and admin with passwords, I have the output file to "recreate" something too.
Issue is, I then copied this Db to another computer for use on there, it worked without a Password, so didn't need to worry about it, now I can't open any Db on my machine??
Quite often I'll make a "training" version of the backend database so that people can "play" (or should I say get training) on dummy data without them having to worry about ruining the live data.
If my real data is in a file called RealData.mdb and my dummy data is in a file called TrainingData.mdb, I want to display this name prominently on my menu form. Thus they can then change the link on the front end to the real or dummy data as required BUT have a reminder as to which they're on.
How can I do this? Further rather than using the file name, could I use one of the database properties (say Title) to display a more friendly text name?
I've created some code to make a backup of my database backend. I've tested it and it seems to work fine, I just have some questions about it's use. Here's the code:
Code: Public Sub backupBackend() Dim TestFile As String Dim strReplFile As String Dim copyFromLocation As String Dim copyToLocation As String copyFromLocation = "S:Trust 2 AnalysisData"
[code]....
It will be triggered by a button push. It creates a batch file to do the copy operation and then delete itself.
In an ideal world I would schedule the backup at a safe time through the Windows scheduler, but our IT department won't allow me to do so.
The concern I have is that we could potentially press the backup button while a user is performing an action that writes/modifies data. If this were to happen would my backup potentially contain corrupted data?
If so, is the workaround to simply press the backup button when nobody is using the database?
I want to deploy an access database at a small office with 5 computers, small network. However I do not intend to create a server in order to have a domain etc. Operating system is win 8.1 pro. Should I use a homegroup or workgroup ? Would it require password in case of workgroup? Which is a recommended way to setup this and keep some security like a guest cant access these files?
So a while back I created a database which I use to keep track of my companies large list of products. It is very simple only 3 tables, 1 query and 1 form. After running into a problem with copying and pasting updates on each computer in the office I decided to split the database on a network drive. This worked for a bit, however I had to add new fields and modify the form, which corrupted the file. Luckily I had a backup before the split.
As far as I could tell all I had to do was modify the backend file and make a new front end. However it seems like it is not as easy as I thought it would be. How do you modify a split database without corrupting the files or using a non-split copy?
If the user clicks on this link then the respective file should be open..I don't want the front end users to see the entire path. So, I would like to have the names as 1234.pdf in the location column instead of M:New1234.pdf. Is it possible to hide the entire path in the backend and show only the name of the file. so that if users click on 1234.pdf then the file needs to open.
How can I add a password to a button, i.e. whenever someone clicked on this button he has to enter a password in order to proceed to the form which the button opens?
I have found the following code to password protect my form, it works but I have one problem, the input txt box does not have the input mask set so the password can be seen on screen, here is the code I have:
Private Sub Maintenance_Button_Click() Dim strPasswd
'Check to see if there is any entry made to input box, or if 'cancel button is pressed. If no entry made then exit sub.
If strPasswd = "" Or strPasswd = Empty Then MsgBox "No Input Provided", vbInformation, "Required Data" Exit Sub End If
'If correct password is entered open Employees form 'If incorrect password entered give message and exit sub
If strPasswd = "ssd" Then DoCmd.OpenForm "Maintenance", acNormal DoCmd.Close acForm, "Menu", acSaveNo Else MsgBox "Sorry, you do not have access to this form", _ vbOKOnly, "Important Information" Exit Sub End If
End Sub
Can anyone advise on what vba cmd to use in the password string to enable the password input mask?
Hi, I have a button on form A that opens form B, but i wud like to put a password on this button, so when you click it, you have to type in a password before form B opens. I'm using access 2000.
Hi Everyone, I am attempting to move a password protected database to a different folder on our shared drive but I am not sure the steps that are needed to do so. The database is already split. Can someone please assist???
Hi, I'm trying to convert a access database in to a sql server. My client hasn't got the exclusive access or doesn't have a username password for the access database. I'm trying to import the data in the access to sql server and when I try to open it it says " This error is usually associated with opening or converting a security enhanced Access 97 or earlier database. If you are not the owner of the database, you most likely will not have the necessary access rights to open or convert it. "
Hi guys! I have a front-end (FE) linked to a back-end (BE) db. I have added a password to the BE, but the knock on effect is that the FE won't work now. Just says 'Invalid Password'. I'm using MS Access 2002.
Any help would be appreciatted.
(The password is to prevent unwanted users from deleting data on the BE on the server)
Hi, I have created a File DSN using my ODBC under Admin Tools and placed it on the network and have linked my Access 2003 tables to point at this.
I have asked a non-domain user to log into this database and open a table but when they do, it defaults to a Domain account until you untick trusted Source. You then have to enter the username and password for the ODBC connection. I thought the whole point of a File DSN was to eradicate the process of logging in. Can anyone Help?? Thanks
This is what the ODBC looks like through text editing software.:eek:
[ODBC] DRIVER=SQL Server UID=MyUserAccountName LANGUAGE=us_english DATABASE=MyDatabaseName WSID=MyWorkstationName APP=Microsoft Data Access Components SERVER=MyServerName Description=MyDescription
I use a database that someone else set up and is no longer here. To get access to the database you need to enter a user id and password. I have a new user who has been getting into the database using an established user's id and password.
I went into the file and found the table with the users, their id's and passwords listed, and added the new person to the table, but I still get an invalid user message when trying to access the database with the new user's information.
I went through the Access Help and tried a couple things it said for adding users to a password protected database, but either I didn't do it right, or the way to add a user is different from what I am getting from Access Help.
Lastly, this database is different in that if I would add a report, it only shows up on my computer when I access the database, the report doesn't show up on anyone else's. That is odd to me, but it is how it works.
Hi, I have been opening password protected access 2003 databases with ASP / ADO for years now. However now we have updated to office 2007 everything gone bottoms up.
I have an access 2007 database (newly made, not converted from 2003), and a fresh asp page. I've gotten the new connection string information for Access 2007 from the internet yet the page cannot open the database.
When I try to open the page the error i get is - "Not a valid password" - 80040e4d. I'm 100% sure the password is correct, the driver is right (the server has office 2007 installed, and the new access driver from the M$ website). Every page i've seen on the internet says that the code I'm using is correct, yet asp still can't open it.
If i remove the password from the database it opens fine, so it's not a corrupt database, or bad path in the code.
If you can shed any light on my problem I would be eternally grateful - been working on it for hours now!
I have a mdb file that does not have database or user level security, but it does have a VBA password.I want to transfer (overwrite) a new form to this database from another Access database. The form I'm exporting has VBA code. When I try using docmd.TransferDatabase I get an error. The error is:
"The TransferDatabase action was canceled."The line is:
where txtCheckInFile is the location and mdb file name I'm trying to send the export.It might be because the form already exists. So, if I go into the database and delete form, and repeat the export I get the message:
"Microsoft protect this Visual Basic for Applications Project with a password. You must supply the password in the Visual Basic Editor before you can perform this operation."My question is it possible to transfer a form to a MDB that has a passworded VBA? I know the VBA password.If not, perhaps it is possible to remove the VBA password in the database (using VBA), make my export, and then add the password back in?