D
DJJ
I have a sub-form that displays as a continuous-form a field and a checkbox.
I want to be able to check only ONE checkbox that appears as rows on the
sub-form. Making that particular record a default record. I found the
following code on www.tek-tips.com to do this that runs in the BeforeUpdate
event of the checkbox and fires an update query that sets the checkbox to
"No".
Private Sub chkAssign_BeforeUpdate(Cancel As Integer)
DoCmd.OpenQuery "qryUpdateRoutingAssign", acViewNormal
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acRefresh, , acMenuVer70
End Sub
When I ran this code a get the runtime error 2115:
"The macro or function set to the BeforeUpdate or ValidationRule property
for this field is preventing Access from saving the data in the field."
Is there a work around this or is this the wrong approach?
Thx
DJ
I want to be able to check only ONE checkbox that appears as rows on the
sub-form. Making that particular record a default record. I found the
following code on www.tek-tips.com to do this that runs in the BeforeUpdate
event of the checkbox and fires an update query that sets the checkbox to
"No".
Private Sub chkAssign_BeforeUpdate(Cancel As Integer)
DoCmd.OpenQuery "qryUpdateRoutingAssign", acViewNormal
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acRefresh, , acMenuVer70
End Sub
When I ran this code a get the runtime error 2115:
"The macro or function set to the BeforeUpdate or ValidationRule property
for this field is preventing Access from saving the data in the field."
Is there a work around this or is this the wrong approach?
Thx
DJ