S
smiley
I have a form that has AllowEdit set to No and a button that when pressed
sets it to yes. The problem is, when I press the button, I can edit the form,
but not the subform. If I set the AllowEdits to Yes and open the form, I can
edit the subform.
How can get the subform to allow edits when I press the edit button I have?
Here is the event code for the button:
Private Sub cmdEditMode_Click()
Dim ID As Variant
Dim FilterState As Variant
ID = Me.CurrentRecord
FilterState = Me.FilterOn
Me!cmbFundGoTo.Enabled = False
Me!cboAsOfDate.Enabled = False
Me.AllowEdits = True
Me.AllowAdditions = False
Me.AllowDeletions = True
Me.DataEntry = False
Me.Section(acDetail).BackColor = 8421631
Me.FilterOn = FilterState
DoCmd.GoToRecord , , acGoTo, ID
End Sub
sets it to yes. The problem is, when I press the button, I can edit the form,
but not the subform. If I set the AllowEdits to Yes and open the form, I can
edit the subform.
How can get the subform to allow edits when I press the edit button I have?
Here is the event code for the button:
Private Sub cmdEditMode_Click()
Dim ID As Variant
Dim FilterState As Variant
ID = Me.CurrentRecord
FilterState = Me.FilterOn
Me!cmbFundGoTo.Enabled = False
Me!cboAsOfDate.Enabled = False
Me.AllowEdits = True
Me.AllowAdditions = False
Me.AllowDeletions = True
Me.DataEntry = False
Me.Section(acDetail).BackColor = 8421631
Me.FilterOn = FilterState
DoCmd.GoToRecord , , acGoTo, ID
End Sub