I have an issue with my subforms. I have a main table called ECNs and three tables called EngApp, PurApp, and ProdApp. These three tables have fields named Approved (checkbox), Denied (checkbox), and Date plus a field to link it back to the ECNs table and a unique ID (AutoNumber).
Each subform created off the three tables has user level permissions. I have the user level permissions working as to who can modify each subform and if Approved is checked then Denied is blank and vise versa. However, I don't want User2 to modify the PurApp subform until User1 has checked Approved box in the EngApp subform.
This is the code I have so far:
Private Sub Form_Open(Cancel As Integer)
If Forms!frmLogin!cboUser.Column(4) = 5 Then
Me.AllowEdits = True
Me.AllowAdditions = True
Else
Me.AllowEdits = False
Me.AllowAdditions = False
End If
End Sub
Private Sub PurApp_Click()
If Me.PurApp = True Then
Me.PurDenied = False
Me.PurDate = Date
Else
Me.PurDenied = ""
End If
End Sub
Private Sub PurDenied_Click()
If Me.PurDenied = True Then
Me.PurApp = False
Me.PurDate = Date
Else
Me.PurApp = ""
End If
End Sub
But this will not work. It says it does not recognize the form EngApp (even though I have linked the two tables).
If Forms!EngApp!EngApp = True Then
Me.AllowEdits = True
Me.AllowAdditions = True
Else
Me.AllowEdits = False
Me.AllowAdditions = False
End If
End Sub
Any thoughts or help as to how to fix this would be greatly appreciated!
Thanks!
Each subform created off the three tables has user level permissions. I have the user level permissions working as to who can modify each subform and if Approved is checked then Denied is blank and vise versa. However, I don't want User2 to modify the PurApp subform until User1 has checked Approved box in the EngApp subform.
This is the code I have so far:
Private Sub Form_Open(Cancel As Integer)
If Forms!frmLogin!cboUser.Column(4) = 5 Then
Me.AllowEdits = True
Me.AllowAdditions = True
Else
Me.AllowEdits = False
Me.AllowAdditions = False
End If
End Sub
Private Sub PurApp_Click()
If Me.PurApp = True Then
Me.PurDenied = False
Me.PurDate = Date
Else
Me.PurDenied = ""
End If
End Sub
Private Sub PurDenied_Click()
If Me.PurDenied = True Then
Me.PurApp = False
Me.PurDate = Date
Else
Me.PurApp = ""
End If
End Sub
But this will not work. It says it does not recognize the form EngApp (even though I have linked the two tables).
If Forms!EngApp!EngApp = True Then
Me.AllowEdits = True
Me.AllowAdditions = True
Else
Me.AllowEdits = False
Me.AllowAdditions = False
End If
End Sub
Any thoughts or help as to how to fix this would be greatly appreciated!
Thanks!