I have a form with several subforms. Most of which are locked . meaning AllowEdits = False, along with additions, and deletions.
main form name: frmCoOpEdit
subform: sfrmCoOpDetail
i have a toggle button on the page that is pressed to signify that they record is complete, once this record is complete i want all the fields in the form to be locked. but i still want the user to have the ability to call up the form to view the data and use the other buttons on the form to view reports, print, and send the record.
i have included this code on the form_load sub
the first if statement just changes the text on a button depending on the value of a field, the second if statement works perfectly with the exception of the last line
how do i control the allowEdits attribute of the subform sfrmCoOpDetail
i have tried
sfrmCoOpDetail.AllowEdits = False
Me!sfrmCoOpDetail.AllowEdits = False
and a bunch of other ways, i can't get it to recognize, by searching this forum i found that I think this is the way
Forms!frmCoOpEdit!sfrmCoOpDetail.AllowEdits = False
but i keep getting an error : Object doesn't support this property of method.
any ideas
main form name: frmCoOpEdit
subform: sfrmCoOpDetail
i have a toggle button on the page that is pressed to signify that they record is complete, once this record is complete i want all the fields in the form to be locked. but i still want the user to have the ability to call up the form to view the data and use the other buttons on the form to view reports, print, and send the record.
i have included this code on the form_load sub
Code:
Private Sub Form_Load()
'complete toggle
If Me!Pending.Value = 0 Then
Me!Pending.Caption = "Pending"
ElseIf Me!Pending.Value = -1 Then
Me!Pending.Caption = "Complete"
End If
'confirmed toggle
If Me!togConfirmed.Value = 0 Then
Me!togConfirmed.Caption = "Pending"
ElseIf Me!togConfirmed.Value = -1 Then
Me!togConfirmed.Caption = "Confirmed"
Me!Pending.Enabled = False
Form.AllowEdits = False
Forms!frmCoOpEdit!sfrmCoOpDetail.AllowEdits = False
End If
End Sub
how do i control the allowEdits attribute of the subform sfrmCoOpDetail
i have tried
sfrmCoOpDetail.AllowEdits = False
Me!sfrmCoOpDetail.AllowEdits = False
and a bunch of other ways, i can't get it to recognize, by searching this forum i found that I think this is the way
Forms!frmCoOpEdit!sfrmCoOpDetail.AllowEdits = False
but i keep getting an error : Object doesn't support this property of method.
any ideas