Is there anyway to restrict the design view for queries and reports only? I don't the users changing the form design, but I want them to be able to create their own queries and reports. Is this possible?
My guess is it is possible, but only with quite a bit of coding involved.
You might want to consider merely hiding all of the forms in your database windows. Doing this will likely prevent anyone but a super-power-user from getting access to your forms. You can check the hidden attribute by right clicking on a form in the database window and selecting the "properties" dialog, or by manipulating properties in vba.
I'm sure there are more secure methods of restricting access to forms, but this one has the benefit of being really easy while still preventing most users from changing forms. -- Herb
The normal process for achieving this would be to establish user security and give users only the permissions you want them to have. This is a relative cinch using user security, but if you've never done it you will need to do some boning up in the books and/or use the security wizard.
Steve King Growth follows a healthy professional curiosity
Thanks Steve for the suggestion on using the user security. I've done that, but then once I turn on the workgroup security, I have to login for all my databases.
I looked at the documentation on Microsoft's web site regarding working with secured and non-secured Access database and they suggest setting up an icon for the secured database and one for access all non-secured databases. However, I wasn't to clear on how to do it.
Does anyone have any suggestion on how to only use the workgroup for the specific database I want to secure and then have my other databases unsecured?
I have a 1 secure database which I provide users access to via the shortcut. You can supply the MDW for the database in the commandline and have access use a specific MDW for that database. Then the user can stay in the default MDW for working in nonsecured db's. Look up commandline options for the switches in the online help. Here's a sample of my shortcut so you can see how it goes.
Recommendations are to make sure you use the quotes around any path that contains a space. If you want to automate the log in a little you can use the /USER switch and then just enter your password. This all depends on how secure you want the database to be and how secure your desktop is.
Steve King Growth follows a healthy professional curiosity
Thanks JoeMiller and scking, both your suggestions were helpful. But the only problem with the user-level security is that someone can bypass all the security of the workgroup file is they have access to open the file in Windows Explorer.
If that's the case then your security is not set up properly. There is a way to tell a database that only one .MDW can be used when opening it. I suggest that you read up a little bit more in the online help about security because there are MANY options and everybody's situation is different.
Private Sub Form_Open(Cancel As Integer)
if SystemDB<>"C:\MyDirectory\MySecure.MDW" then
msgbox "You may join valid .MDW file!"
docmd.quit
end if
end sub
The 'Admin' user is the default user for opening an Access database. All users have the 'user' group permissions. If users can open the database then at the very least you need to take the following actions:
1) Verify that the 'Admin' user only has 'user' group permissions.
2) Remove all permissions from the 'user' group
3) Create a new group (MyUsers maybe) to act as the 'user' group
4) Assign the MyUsers group permissions to all users.
So even though the 'Admin' user inherits all permissions from the 'users' group there are no permissions to inherit. Since you have assigned MyUsers group permissions they inherit whatever permissions you want. DO NOT give the 'Admin' user MyUsers group permissions.
Steve King Growth follows a healthy professional curiosity
Building off Aivars snippet, maybe you would have the system database at different locations for different users at different sites.
Steve King
Public Function IsRightSystemDb() As Boolean
Dim strSystemDb As String
Dim intChars As Integer
strSystemDb = SystemDB
intChars = Len(strSystemDb)
For intChars = intChars To 0 Step -1
If Mid$(strSystemDb, intChars, 1) = "\" Then
strSystemDb = Mid$(strSystemDb, intChars + 1)
If strSystemDb = "dmatssecure.mdw" Then
IsRightSystemDb = True
GoTo Exit_Proc
Else
IsRightSystemDb = False
End If
End If
Next intChars
Exit_Proc:
Exit Function
HandleErr:
Resume Exit_Proc
Resume
End Function Growth follows a healthy professional curiosity
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.