DataBase - User Level Security
Asked By Jeff
16-Nov-09 11:44 AM
Greetings, I have an application I am ready to distribute. When I set up User
level secruity I assigned all user a password. What I'd like to do is force
the users to change thier passwords the first time they log in. Any ideas how
to get this done?
DBEngine.CreateWorkspace
(1)
DBEngine.Workspaces
(1)
VBA
(1)
MustChangPassword
(1)
Database
(1)
TestWorkspace
(1)
NewPassword
(1)
CurrentUser
(1)
Wolfgang Kais replied to Jeff
Greeting, Jeff.
You should invoke some VBA code when the database is opened. To
achieve this, use a startup form or an AutoExec macro with a RunCode
action.
To Test, whether the user should change the password, you could use
a function like this (with DAO code):
Function MustChangPassword(DefPwd As String) As Boolean
On Error GoTo Err_MustChangPassword
With DBEngine.CreateWorkspace("TestWorkspace", CurrentUser, DefPwd)
MustChangPassword = True
.Close
End With
Exit_MustChangPassword:
Exit Function
Err_MustChangPassword:
MustChangPassword = False
Resume Exit_MustChangPassword
End Function
To let the user change the password, use a form with two textboxes
NewPwd and ConfirmPwd, Password as Input Mask. Check any neccessary
condition (to compare both entries, use the StrComp function) and
finally set the password using something like
With DBEngine.Workspaces(0).Users(CurrentUser)
.NewPassword DefPwd, NewPwd
End With
--
Regards,
Wolfgang
Jeff replied to Wolfgang Kais
Wolfgang, That was a Perfect solution Thanks.
Library Database DataBase Firstly, I am not sure if Library database is the correct term. I am talking about Dbs to which you set a reference in the VBA references section. Secondly apologies for sort-of reposting this question, but I drew blanks last time. Now assuming I have several referenced (library?) databases in my main database, how do I get the names of all the forms in all the Dbs? CodeProject AllForms.Count gives me the correct number of forms if I am in that referenced database. What I think I need is a method of looping through all the different CodeProject names in the main database, but there is not a sort of CodeProjects parent object. Or somehow moving the focus And, No, there is not any parent object for all the code projects. Because each database only knows about its own objects (or documents), you have to use a procedure in
Might be outgrowing Access but daunted by SQL Server DataBase I am close to completing the consolidation of various small Access databases and a couple of Excel spreadsheets that my little company uses (5 staff) into an all encompasing Access database and I was planning on splitting the database when I was finished to allow simaltaneous use of it by staff on our small to me that I am going to need to give staff access to this new database from remote locations (outside of our office network). Two staff members are regularly overseas, one been playing around with trying to link tables from remote locations (ftp path of the database on our Network Storage Device at the office) and needless to say - that do not It all started when I came across a very encouraging article on keeping your Access database as your front end application and linking to SQL Server database tables. I am finding it MUCH more complicated than I had hoped. Can anyone suggest a simpler way of achieving remote access to my database? I have at my disposal a Network Storage Device which has remote access capabilities (this
Exporting Report from Access into PDF DataBase Hi everybody. I am hoping someone may be able to help me out. I have a database report that I want to export into PDF for each individual customer. Basically, I want time this source data changes. I am trying to work with Stephen Leban's A2000ReportToPDF database right now, but it is far more advanced than my puny range of code knowledge I am working with right now: Dim qdf As DAO.QueryDef Dim dbs As DAO.Database Dim rstMgr As DAO.Recordset, rstMgr1 As DAO.Recordset Dim strSQL As String, strTemp As Close strTemp = strQName ' * ** code to set strSQL needs to be changed to conform to your ' * ** database design - - ManagerID and EmployeesTable need to ' * ** be changed to your table and field names ' Get rstMgr.EOF = False ' * ** code to set strMgr needs to be changed to conform to your ' * ** database design - - ManagerNameField, ManagersTable, and ' * ** ManagerID need to be changed to your table and field names Acct#", "Customers_To_Email", _ ' * ** code to set strSQL needs to be changed to conform to your ' * ** database design - - ManagerID and EmployeesTable need to ' * ** be changed to your table and field names strSQL everybody. I am hoping someone may be able to help me out. I have a database report that I want to export into PDF for each individual customer. Basically, I want
Data Macros Don't Work With Linked Tables??? DataBase I have an Access 2010 ACCDB with an AfterInsert data macro on a table. Works Outlook (1) I should note that I am using the data macro to call a VBA function (by setting a local macro variable to the result of the function call). So this is not for the web, I did not see a problem with calling a VBA function (and various places I have seen online mentioned workarounds for calling VBA from a data macro). But, again, while it works when I insert a record in note? In it I added that I was using the AfterInsert macro to run some VBA code (by setting a local variable to the result of a function call). Maybe that maybe that is the problem Yes, in this case, you need a copy of the VBA in the front end. (for testing you can place it in both - since if you happen to open the back end table directly, then the VBA code is ALSO required since the front end might not even be open and the talk to that may be sitting on your computer. So when the trigger fires, that VBA code will be required. So, the VBA needs to exist in the front end if
Access 2010 with Sharepoint 2010 DataBase I found this article http: / / sharepointproconnections.com / Articles / tabid / 149 / nodeid / 1996 / SharePoint-Wish-List is called a develpment stack. that means you need to adopt a web server, a database server, and probably choose a particular browser scripting language on top of this. And, some compatible code for your web forms (java, or vbs Script for example). And, for that database server to hold your data you have to train yourself in using SQL server, mySQL, oracle or whatever particular database server you like. You have to learn the tools on how to create the tables better be sure that the target web hosting service will have and support that particular database system + features. (believe it or not, in some cases the web hosting provider will support a particular database system, but some database features may not necessarily be supported). So the database server thing can be quite a big investment of your time to learn the database