Transfer data to another table

M

Maria

Hi,

I have a check box on a datasheet and I want when the
check box is true(checked) then all data to transfered to
another table. FinishedWorks table. So that in the first
table to exist only the ongoing works.

How can I do that???

Please help me!!

Thank you very much
Maria
 
M

Madhivanan

Maria,

Try this

If CheckBox.Checked=True then
Insert into FinishedWork (col1,col2,...colN) Select (col1,col2,...colN)
from OldTable
Delete from OldTable

Madhivanan
 
V

Van T. Dinh

Generally, this is not recommended. Sooner or later, someone will ask the
facility to see both completed works and current works.

Much better to simply have a flag Field (or a completed date Field) in the
current Table and use the flag or CompletedDate to tag the work as
completed.

For day-to-day ops where you mainly want to see current work, use criteria
in the queries (which can be used as the RecordSource for the Forms) to
filter out Records marked as "archived".
 
Top