Ms Access Error 3031 Not A Valid Password
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Runtime Error 3031. Not a valid password Microsoft Office for Developers > Access for Developers Question 0 Sign in to vote I am using VB6, DAO connection to connect to Access ACCDB file. The ACCDB file is created with password. But program hit error whenever attempt toopen a db connection. The message as below. I have tested the password by directly opening the ACCDB file in Microsoft Access. Password is correct. The error message is runtime error 3031. Not a valid password The code use as below Sub OpenDB() Dim db As DAO.Database Dim ws As DAO.Workspace Dim rst As DAO.Recordset Set ws = DBEngine.Workspaces(0) Set db = ws.OpenDatabase("mydata.accdb", False, False, ";PWD=test12345") Set rst = db.OpenRecordset("house", dbOpenDynaset) If rst.RecordCount > 0 Then rst.MoveLast MsgBox rst!address End If rst.Close db.Close End Sub Friday, July 29, 2011 8:42 AM Reply | Quote Answers 1 Sign in to vote Just found the reason after searching for solution for many days. The database encryption done using 64bit window OS would not allow program to connect to it. By using 32bit OS to encrypt it, VB6 can now connect to it. BTW. Thanks all for your kind reply. jsl Marked as answer by JSLu Tuesday, August 02, 2011 11:37 AM Tuesday, August 02, 2011 11:36 AM Reply | Quote All replies 0 Sign in to vote Try this article: http://support.microsoft.com/kb/235422 -Tom. Microsoft Access MVP Friday, July 29, 2011 9:31 AM Reply | Quote 0 Sign in to vote I have tried the code in the article http://support.microsoft.com/kb/235422. The article is meant for Access MDB. So far I do not have problem to open MDB file with password. Only have problem when opening Access ACCDB file. The Access ACCDB file is created in Microsoft Access 2007 Friday, July 29, 2011 10:27 AM Reply | Quote 0 Sign in to vote There are allot of issues why not change your main data base from mdb to accdb , in my practice I've leaved tables in mdb format and the application converted to accdb,
your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: Not a valid password. (Error 3031) Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 07-10-07,03:41 #1 ybg1 View Profile View Forum Posts Registered User Join Date May 2007 Posts 37 https://social.msdn.microsoft.com/Forums/office/en-US/3a09a72c-9f68-427f-b9fd-4d695bdc3bfe/runtime-error-3031-not-a-valid-password?forum=accessdev Unanswered: Not a valid password. (Error 3031) Created an Access database and program standalone, that are splited, and the tables are linked to the program. I've setup a password on the database tabes. When I open the program I get "Not a valid password. (Error 3031)". How can I get over this problem and still have a password set? Reply With Quote 07-10-07,08:17 #2 gvee View Profile View Forum http://www.dbforums.com/showthread.php?1620219-Not-a-valid-password-(Error-3031) Posts Visit Homepage www.gvee.co.uk Join Date Jan 2007 Location UK Posts 11,422 Provided Answers: 10 Without more information this is a stab in the dark... Declare the password in your connection string(s). Try this link http://connectionstrings.com/?carrier=access2007 George Home | Blog Reply With Quote 07-15-07,22:56 #3 pkstormy View Profile View Forum Posts Moderator Join Date Dec 2004 Location Madison, WI Posts 3,926 If you've set up security via MSAccess Security, there is an *.mdw file present. You'll need to create a shortcut to the database which uses the /wrkgrp option and points to the mdw file. So the properties for your shorcut might look like this: "C"\Program Files\Microsoft Office 2000\Office\MSAccess\MSAccess.EXE " /wrkgrp "C:\MySecurity.mdw " "c:\MyApplicationName.mdb" or something like that (it may not be correct on the syntax) but research this further on the web for MSAccess security files and MDW files. (If this is the way you set up security.) Otherwise, I take it holding down the shift key and opening the database doesn't work? Expert Database Programming MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0) Reply With Quote Quick Navigation Microsoft Access Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Non-SQL Forums MongoDB Database Server Sof
Groups Books Podcasts Forum Jobs Home Database Forum Back to discussion How to Open Password with Database(Ms Access db) in Run time From DAO Replies (5) Email updates Last post was http://www.developerfusion.com/thread/41641/how-to-open-password-with-databasems-access-db-in-run-time-from-dao/ 18 Sep 2006 at 08:01 databases Sri Lanka Reply 10 years ago by Nishantha http://p2p.wrox.com/access/59941-not-valid-password-error-3031-a.html N.K. Rathnayke , Sri Lanka Joined 10 years ago Hi How to Open Password with Databasein Run time From DAO I want to know How to Open Password with Databasein Runtime From DAO.Please Somebody Tell me. MY E-MAIL ADDRESS :nishantha_213@yahoo.com Nihantha. Report abuse Reply 10 years ago by mycode Deepak Noida, India ms access Joined 10 years ago Hi,i just saw your question in fusiondeveloper.com.you asked How to Open Password with Database in Run time From DAO I want to know How to Open Password with Database in Runtime From DAO.Please Somebody Tell me. well i think that you asked something wrong. if your question is how to open a database with the password protected... then i can tell ms access error you solution.please verify your question once again.. Report abuse Reply 10 years ago by Nishantha N.K. Rathnayke , Sri Lanka Joined 10 years ago Thanks. I got Your Massage, I Have Problem. I typed Following Code and Run Set db=OpendataBase("C:\Mydb\db1.mdb") But I got Error Massage at Runtimelike this (Run-time Error '3031': "Not a valid Password") I Connected Ms Access and Visual Basic 6.0 from DAO Please Tell me how to open a database with the password protected at Runtime (DAO) Thank You, Report abuse Reply 10 years ago by khari6579 Hari K Chennai, India Joined 10 years ago Hi Nishanth I hope the follwoing coding will give the logic for how to open .mdb file with password protected. Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim cmd As New ADODB.Command Private Sub Command1Click() Set rs = New ADODB.Recordset rs.Open "Select * From test", conn, adOpenStatic, adLockOptimistic Text1.Text = rs.Fields(0) ' u can modify the record using the following method 'Set cmd = New ADODB.Command 'cmd.ActiveConnection = conn 'conn.BeginTrans 'cmd.CommandText = "Update table set field="" Where field='" & Text1.Text & "'" 'cmd.CommandType = adCmdText 'cmd.Execute 'conn.CommitTrans End Sub Private Sub FormLoad() Set conn
Unanswered Topics Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access Not a valid password. (Error 3031) User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) July 10th, 2007, 02:43 AM ybg1 Authorized User Points: 110, Level: 2 Activity: 0% Join Date: Jul 2007 Location: , , . Posts: 22 Thanks: 0 Thanked 0 Times in 0 Posts Not a valid password. (Error 3031) -------------------------------------------------------------------------------- Created an Access database and program standalone, that are splited, and the tables are linked to the program. I've setup a password on the database tabes. When I open the program I get "Not a valid password. (Error 3031)". How can I get over this problem and still have a password set? #2 (permalink) July 10th, 2007, 06:33 AM mmcdonal Friend of Wrox Points: 9,611, Level: 42 Activity: 0% Join Date: Mar 2004 Location: Washington, DC, USA. Posts: 3,069 Thanks: 0 Thanked 10 Times in 10 Posts Which part is passworded, the front end or the back end. I seem to remember you can only password the front end in these situations. mmcdonal #3 (permalink) July 10th, 2007, 07:20 AM Ashfaque Authorized User Join Date: May 2006 Location: , , India. Posts: 47 Thanks: 0 Thanked 0 Times in 0 Posts :) Standalone program? What back end you are using? #4 (permalink) April 18th, 2008, 04:33 AM Suresh62 Authorized User Join Date: Dec 2007 Location: , , . Posts: 38 Thanks: 0 Thanked 0 Times in 0 Posts I also have the same problem. My database is on 2000file format. I want to s