Setting add/edit permissions on form tabs.

izzywizzy

New member
Local time
Today, 09:00
Joined
Jun 5, 2013
Messages
2
I have an Access 2003 database. I have a form with 5 tabs. I want to prevent some users from editing data on some of the tabs.

I added some logic to the OPEN property of the parent form but it does not work. "Object doesn't support this property or method." What is the correct way of controlling access of the data on the tabs?

In the logic below I first determine the user's permission for each tab. If the user has read-only access they will not be allowed to edit anything on this tab. There are 50 fields on the accounting tab and a subform. If possible, I don't want to have to specify each field individually in the code. Plus there are 5 tabs with numerous fields on each.
BTW: [add designer] is the parent form and [accounting] is the tab.

If DLookup("[permission_studentacct_ReadOnly]", "Users", "Contact_ID = " & Forms![Global]![UserID]) = True Then
Forms![Add Designer].[Accounting].AllowEdits = False
Else
End If
 
Last edited:
I think you will find that a tab control has no "AllowEdits" property, which is what the error message says.
However, the form that is on that tab does, so you need to reference the form instead of the tab.
 
Are you saying I cannot control the tabs individually? Some users may have all rights to the parent form but not allowed to make changes to data on the other 5 tabs such as accounting. If I put this on the parent form how does this help me prevent the user from modifying data on that tab but allow the user to modify data on the parent form and the other 4 tabs? Seems like adding it to the parent form would control all the data on it and all 5 tabs. If this is not the case please provide the logic to have different permissions depending on which tab you clicked on in the form.
 
AFAIK the only control you have over each actual tab is its Enabled property. However you could set the AllowEdits Property of a subform that is shown on a tab. I would suggest setting the property in the main forms On Open event.
 

Users who are viewing this thread

Back
Top Bottom