Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue] Dim flg As Boolean
If Me!Status = "Open" Then flg = True
Me.AllowAdditions = flg
Me.AllowDeletions = flg
Me.AllowEdits = flg[/blue]
[blue] Dim sfrm As Form, flg As Boolean
Set sfrm = [[purple][b]YourSubFormName[/b][/purple]].Form
If Me!Status = "Open" Then flg = True
[green]'MainForm[/green]
Me.AllowAdditions = flg
Me.AllowDeletions = flg
Me.AllowEdits = flg
[green]'subForm[/green]
sfrm.AllowAdditions = flg
sfrm.AllowDeletions = flg
sfrm.AllowEdits = flg
Set sfrm = Nothing[/blue]
[blue] Set sfrm = [[purple][b]YourSubFormName[/b][/purple]].Form[/blue]
Private Sub Form_Current()
Dim SFRM As Form, FLG As Boolean
Set SFRM = CusChargesSubform.Form
If Me!Status = "Open" Then FLG = True
'MainForm
Me.AllowAdditions = FLG
Me.AllowDeletions = FLG
Me.AllowEdits = FLG
'subForm
SFRM.AllowAdditions = FLG
SFRM.AllowDeletions = FLG
SFRM.AllowEdits = FLG
Set SFRM = Nothing
End Sub
[blue]Change:
Set SFRM = CusChargesSubform.Form
To:
Set sfrm = [red][b][[/b][/red]CusChargesSubform[red][b]][/b][/red].Form[/blue]