B
burchark
Hi!
I want to lock the fields on a form and subform based on the status field in
my main table. The status may be open or closed. Using a combo box (named
status and with controlsource = status), I want to select either "Open" or
"Closed" and use the AfterUpdate event to run the code for LockBoundControls
(from http://allenbrowne.com/ser-56.html).
By the way, the code works beautifully if I just use a button on the form as
suggested by the original coding for 'LockBoundControls'. But when I want to
run it from status_AfterUpdate, it produces errors at the point of setting
the form's dirty property to false:
If frm.dirty then
frm.dirty = false
end if
Has anyone out there been able to run LockBoundControls based on the value
selected in a bound ComboBox? If so, how? Any assistance is greatly
appreciated.
I want to lock the fields on a form and subform based on the status field in
my main table. The status may be open or closed. Using a combo box (named
status and with controlsource = status), I want to select either "Open" or
"Closed" and use the AfterUpdate event to run the code for LockBoundControls
(from http://allenbrowne.com/ser-56.html).
By the way, the code works beautifully if I just use a button on the form as
suggested by the original coding for 'LockBoundControls'. But when I want to
run it from status_AfterUpdate, it produces errors at the point of setting
the form's dirty property to false:
If frm.dirty then
frm.dirty = false
end if
Has anyone out there been able to run LockBoundControls based on the value
selected in a bound ComboBox? If so, how? Any assistance is greatly
appreciated.