Conserving values in Sub & SubSub forms.

F

Frank Martin

I understand that with a Form with sub &
sub/sub forms the underlying tables are
updated when the cursor leaves on subform and
enters another, and in effect the entries are
lost to the operator.

I need to use the same invoice date for the
"TxnDate" in the "ProductTxns" subsub form as
I use for the "SuppTxns" on the main form,
and I have solved this in the following
tedious fashion.

1/ I manually enter the date in the
"ItemDate" field on the "SuppTxns" main form.

2/ I make a copy of this date using a macro
"Setvalue" facility, on to a Dedicated
Control on to the main form, with the "on
exit" property ot the "ItemDate" field. (This
fixes this date, because the main form is
updated as soon as the cursor leaves it.)

3/ When I get to the "ProdTxns" subsub form,
I save myself the trouble of entering the
same date again, this time in the "TxnDate"
field, by (again) using the macro "Setvalue"
facility which copies the copy of the
"ItemDate" in the Dedicated Control, this
time using the "on enter" property of the
"TxnDate".

All this works fine, but is tedious. Is
there a way to have all the values in
Main/sub/subsub forms remain visible to the
operator until, say, a "update all" control
button is pushed?

Please help, Frank
 
S

Steve Schapel

Frank,

This is very odd. The normal behaviour of a form would be to remain on
the current record when you move the focus to a subform (or a subsubform
for that matter). In fact, it is pretty useless otherwise. And then
the data in the subform shows/enters the many-side data related to the
main form record. So I am not sure what is resulting in your data being
"lost to the operator", but must be to do with yur form design somehow.

In any case, if the date in the subform records is the same as the date
in the corresponding main form record, it seems to me there is a flaw
anyway in the table structure, in that the subform data is therefore
redundant. It seems to me that you could remove the date field from the
table that the subform is based on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top