COACHMAN99
asked on
access read-only database
Hi Folks
how does one place a database into read-only mode with respect to data.
The /ro switch stops editing of objects: I wish to stop editing of data, but allow users to open all forms, queries, tables and reports for viewing. (ideally including sorting and filtering but obviously not saving the 'view')
thanks
how does one place a database into read-only mode with respect to data.
The /ro switch stops editing of objects: I wish to stop editing of data, but allow users to open all forms, queries, tables and reports for viewing. (ideally including sorting and filtering but obviously not saving the 'view')
thanks
ASKER
this is a 2010 ACE FE/BE arrangement.
is there any easy way to open the FE in R/O mode that blocks editing data, but allows all viewing?
thanks
is there any easy way to open the FE in R/O mode that blocks editing data, but allows all viewing?
thanks
<<is there any easy way to open the FE in R/O mode that blocks editing data, but allows all viewing?>>
No. Your only way to limit access to data is via forms.
and I should have been clearer with my last comment. A JET based BE (.MDB), yes as workgroup security is available. If ACE (.accdb), then no as workgroup security was deactivated.
I always think of "ACE" as being nothing more than JET (really it was more of just a name change), and I assumed you were using a later version.
I should have been clearer when answering.
Jim.
No. Your only way to limit access to data is via forms.
and I should have been clearer with my last comment. A JET based BE (.MDB), yes as workgroup security is available. If ACE (.accdb), then no as workgroup security was deactivated.
I always think of "ACE" as being nothing more than JET (really it was more of just a name change), and I assumed you were using a later version.
I should have been clearer when answering.
Jim.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Jim and Dale
that (unfortunately) confirms my unhappy suspicions.
I was hoping to avoid coding permissions for thousands of controls on many forms with a simple switch.
My next choice would be to make all form-recordsets snapshots - presumably this would be quicker than for individual controls?
My objective is to improve performance across the system by limiting db activity to the data-entry people, and 'lock' all query/reporting/viewing users.
cheers
that (unfortunately) confirms my unhappy suspicions.
I was hoping to avoid coding permissions for thousands of controls on many forms with a simple switch.
My next choice would be to make all form-recordsets snapshots - presumably this would be quicker than for individual controls?
My objective is to improve performance across the system by limiting db activity to the data-entry people, and 'lock' all query/reporting/viewing users.
cheers
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That is bad news. Are we 100% sure the snapshot will make things slower?
and that setting form/data permissions (allow...) will improve performance (over current state)?
cheers
and that setting form/data permissions (allow...) will improve performance (over current state)?
cheers
<<That is bad news. Are we 100% sure the snapshot will make things slower?>>
Depends on your recordset sizes, but in general yes.
While a "Snapshot" sounds fast, what your actually asking JET to do is give you the way records look at a given point in time.
The only way it can do that is to make a complete copy of every record.
Jim.
Depends on your recordset sizes, but in general yes.
While a "Snapshot" sounds fast, what your actually asking JET to do is give you the way records look at a given point in time.
The only way it can do that is to make a complete copy of every record.
Jim.
ASKER
Thanks Jim and Dale
You really are not talking about a lot of code to lock/unlock controls. A single procedure would do it:
Then, in the Form_Open event of each of your data forms, you would include a line of code:
By default, the subroutine above would give everyone whose userid had not been entered into the UserPermissions table ReadOnly permissions.
Public Sub FormLockUnlock(frm As Form)
Dim bReadOnly As Boolean
Dim strCriteria As String
Dim ctrl As Control
strCriteria = "[UserID] = '" & fosusername() & "'"
bReadOnly = Nz(DLookup("ReadOnly", "UserPermissions", strCriteria), -1)
For Each ctrl In frm.Controls
Select Case ctrl.ControlType
Case acCheckBox, acListBox, acComboBox, acTextBox
ctrl.Locked = bReadOnly
Case Else
'do nothing
End Select
Next
End Sub
You can get the API code for the fOSUserName function here.Then, in the Form_Open event of each of your data forms, you would include a line of code:
FormLockUnlock me
By default, the subroutine above would give everyone whose userid had not been entered into the UserPermissions table ReadOnly permissions.
ASKER
Thanks Dale
that is very useful and worth considering.
that is very useful and worth considering.
If a SQL server backend, then it's just security on the tables/roles.
Jim.