-----Original Message-----
Just by your description of the tasks, it can't be done with just one
action. At a minimum, there will be 2 actions, 1 to copy the data, and the
2nd to delete the data. Access doesn't have a move command. Here are some
steps using sime queries. You can also do this using recordsets, but this
might be easier to understand.
Append Query
Insert Into T_Bck
Select T_HeadHouse.*
From T_HeadHouse
Where (IdHH = Forms![NameOfForm]![IdField])
Delete Query
Delete T_HeadHouse.*
From T_HeadHouse
Where (T_HeadHouse.IdHH = Forms![NameOfForm]![IdField])
You can then do the same to the subform data. I don't understand your
statement about reading the data chronologically. If you can expand on
this.
Kelvin
Thanks Kelvin for your replay and explanation.
The situation is more or less...
I have:
T_HeadHouse (to Form) with IdHH with primary Key.
T_FamilyAggregate (to SubForm) relation connected through
the field IdHH without primary key.
One to Many in relationships.
For "self-seeking" I would like: with only one action in
command boutton, two tasks. To append data to T_Bck and
delete same records. Later, in same Table we have all
records to read, chronologically.
Perhaps arduous to me...
Many thanks.
an
-----Original Message-----
Yes this can be done, but why would you backup both
tables into the same
table. Are the data types of the 2 tables the same that
you can even do
this or do you mean you want to send both data
unnormalized into T_Bck?
I.E.
T_Form contains ID: 1, Name:Bob
T_SubForm contains ID:1, sID:1, Child:Billy, ID:1, sID:2,
Child:Sue
T_Bck will become
ID:1, Name:Bob, sID:1, Child:Billy
ID:1, Name:Bob, sID:2, Child:Sue
If this is the case, just create an append query to
generate the data above
and add to T_Back. Then use 2 delete queries to remove
the data from each
underlying table. If you have referential integrity set,
just deleting from
the table for T_Form will also delete from the table for
T_SubForm.
Kelvin
message
Hello!
I have a Form (T_Form) with SubForm (T_SubForm).
In Form I have a command button to send present record
to
T_Bck and delete it.
Now, I would like to send "SubRecords" (T_SubForm) to
T_Bck too, with same command button, but I don't know if
is possible.
Thanks in advance.
an
.
.