BvCF
MIS
- Nov 11, 2006
- 92
Have the following module that I had planned to not allow the end-user to delete data within the controls on my multi-tabbed form, frmTabbed. The employees are only able to access the "Review Accounts" page of the multi-tabbed form (TabCt10.Pages.Item(2)) and two other pages. There are about 50 controls on the "Review Accounts" page.
The only controls that the "employee" should be able to enter data into should be
Status (Allow additions and edits)
Reason (combo box) (Allow additons)
Amt Remitted (Allow additions and edits)
Date Remitted (Allow additions)
Comments (Allow additions, deletes and edits)
Other fields such as AcctNo, Name, and Balance should not allow for any additions, edits or deletions. But, it should allow the importation of data.
What modifications do I need to make that will allow the importation of data from Oracle via a passthru query but not allow the employee or the administrator to delete data from several controls?
Other Questions
1. Is the properties of "AllowEdits, AllowAdditions, and AllowDeletes available at the control level or only at the form level?
2. It appears that it would be preferable to lock all of the controls initially and individually unlock the 5 controls displayed above (Status, Reason, Amt Remitted, Date Remitted, and Comments). What are your thoughts?
Current code
Public Sub set_privs()
Forms!frmTabbed.AllowAdditions = False
Forms!frmTabbed.AllowDeletions = False
Forms!frmTabbed.AllowEdits = False
Forms!frmTabbed.AllowFilters = False
Select Case GBL_Access_Level
Case "M" ' manager
Me.TabCtl0.Pages.Item(1).Visible = True
Me.TabCtl0.Pages.Item(2).Visible = True
Me.TabCtl0.Pages.Item(3).Visible = True
Me.TabCtl0.Pages.Item(4).Visible = True
Forms!frmTabbed.AllowAdditions = True
Forms!frmTabbed.AllowDeletions = True
Forms!frmTabbed.AllowEdits = True
Forms!frmTabbed.Requery
Case "E" ' employee
Me.TabCtl0.Pages.Item(2).Visible = True
Me.TabCtl0.Pages.Item(4).Visible = True
Forms!frmTabbed.AllowAdditions = True
Forms!frmTabbed.AllowEdits = True
Forms!frmTabbed.Requery
End Select
End Sub
Currently, I am experimenting with the modification of teh code above to something like the following
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowAdditions = False
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowDeletions = False
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowEdits = False
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowFilters = False
The only controls that the "employee" should be able to enter data into should be
Status (Allow additions and edits)
Reason (combo box) (Allow additons)
Amt Remitted (Allow additions and edits)
Date Remitted (Allow additions)
Comments (Allow additions, deletes and edits)
Other fields such as AcctNo, Name, and Balance should not allow for any additions, edits or deletions. But, it should allow the importation of data.
What modifications do I need to make that will allow the importation of data from Oracle via a passthru query but not allow the employee or the administrator to delete data from several controls?
Other Questions
1. Is the properties of "AllowEdits, AllowAdditions, and AllowDeletes available at the control level or only at the form level?
2. It appears that it would be preferable to lock all of the controls initially and individually unlock the 5 controls displayed above (Status, Reason, Amt Remitted, Date Remitted, and Comments). What are your thoughts?
Current code
Public Sub set_privs()
Forms!frmTabbed.AllowAdditions = False
Forms!frmTabbed.AllowDeletions = False
Forms!frmTabbed.AllowEdits = False
Forms!frmTabbed.AllowFilters = False
Select Case GBL_Access_Level
Case "M" ' manager
Me.TabCtl0.Pages.Item(1).Visible = True
Me.TabCtl0.Pages.Item(2).Visible = True
Me.TabCtl0.Pages.Item(3).Visible = True
Me.TabCtl0.Pages.Item(4).Visible = True
Forms!frmTabbed.AllowAdditions = True
Forms!frmTabbed.AllowDeletions = True
Forms!frmTabbed.AllowEdits = True
Forms!frmTabbed.Requery
Case "E" ' employee
Me.TabCtl0.Pages.Item(2).Visible = True
Me.TabCtl0.Pages.Item(4).Visible = True
Forms!frmTabbed.AllowAdditions = True
Forms!frmTabbed.AllowEdits = True
Forms!frmTabbed.Requery
End Select
End Sub
Currently, I am experimenting with the modification of teh code above to something like the following
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowAdditions = False
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowDeletions = False
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowEdits = False
Forms!frmTabbed.TabCtl0.Pages.Item(2).AllowFilters = False