K
Keith G Hicks
A2k
2 tables:
tblCustomers
tblCustomerAddresses (child of "tblCustomers")
The form frmCustomers is bound to tblCustomers. There's a subform on
frmCustomers called frmCustomerAddresses that is bound to
tblCustomerAddresses.
On frmCustomers there is an "Edit" button, a "Cancel" button and a "Save"
button. Until the "Edit" button is clicked the follwoing settings apply:
frmCustomers.AllowEdits = false
frmCustomers!frmCustomerAddresses.Form.Locked = true
When the user clicks "Edit" the above changes to the following:
frmCustomers.AllowEdits = true
frmCustomers!frmCustomerAddresses.Form.Locked = false
All of this works fine but the problem is with the "Cancel" button which is
on the frmCustomers form, not the frmCustomerAddresses form. If the user
edits data on frmCustomers and clicks "Cancel" all is good. But if he/she
edits data on frmCustomerAddresses then by the time the click occurs of
course Access has already moved off of the active record in
frmCustomerAddresses and saved it (as long as the data is valid which is
another issue). Without making the forms unbound, or without putting another
separate cancel button on the subform, how is this best handled?
Thanks,
Keith
2 tables:
tblCustomers
tblCustomerAddresses (child of "tblCustomers")
The form frmCustomers is bound to tblCustomers. There's a subform on
frmCustomers called frmCustomerAddresses that is bound to
tblCustomerAddresses.
On frmCustomers there is an "Edit" button, a "Cancel" button and a "Save"
button. Until the "Edit" button is clicked the follwoing settings apply:
frmCustomers.AllowEdits = false
frmCustomers!frmCustomerAddresses.Form.Locked = true
When the user clicks "Edit" the above changes to the following:
frmCustomers.AllowEdits = true
frmCustomers!frmCustomerAddresses.Form.Locked = false
All of this works fine but the problem is with the "Cancel" button which is
on the frmCustomers form, not the frmCustomerAddresses form. If the user
edits data on frmCustomers and clicks "Cancel" all is good. But if he/she
edits data on frmCustomerAddresses then by the time the click occurs of
course Access has already moved off of the active record in
frmCustomerAddresses and saved it (as long as the data is valid which is
another issue). Without making the forms unbound, or without putting another
separate cancel button on the subform, how is this best handled?
Thanks,
Keith