Hi All,
I have a mainform with a subform in which I show some task summary
data.
On the mainform I have a number of unbound controls that reflect values
relevant to each task in the subform. The unbound controls are
populated in the subform's OnCurrent even from a number of different
tables related to the records in tbl_tasks, which is the recordset
displayed in the subform.
My goal is that users should be able to change the values in the
unbound controls on the mainform, and then when the user navigates to
another record in the subform, the following should happen:
- determine if values in unbound controls on mainform have changed
(currently, I set the mainform's 'Dirty' property to true when any of
the unbound control values are changed)
- update the relevant tables to reflect changed values associated with
the 'navigated from' record
- retrieve and populate the unbound controls with the values associated
with the 'navigated to' record
I know I can achieve this by having the unbound controls uneditable
until an 'edit values' button is clicked, which I would use to disable
the subform. Then, when the user clicks 'save changes', I'd write the
values to the tables, disable the unbound controls again, and enable
the subform allowing navigation.
I'm just wondering is there's a way that simulates the feel of editing
values in a datasheet etc, where navigating to the next record
automatically writes any changes in the 'navigating from' record.
Any help appreciated!
Much warmth,
planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org