Move a record to another table

  • Thread starter Thread starter Candiz
  • Start date Start date
C

Candiz

Hello everyone.
Is there a way to move (cut and paste) a record or records from a subform to
another table? I'm trying to figure out how to move a record when it is
flagged to move to another table. In addition, before appending to the
other table, an input box (sort of an input parameter) will appear prompting
the table name to where it will be stored. A button will be used for this
purpose. Thank you in advance for your assistance.

Candiz
 
Hello everyone.
Is there a way to move (cut and paste) a record or records from a subform to
another table? I'm trying to figure out how to move a record when it is
flagged to move to another table. In addition, before appending to the
other table, an input box (sort of an input parameter) will appear prompting
the table name to where it will be stored. A button will be used for this
purpose. Thank you in advance for your assistance.

Candiz

I'm VERY VERY queasy about this design. Having multiple tables with
the same structure (so that it would make sense to append a record
from one table to another), and even more so, having multiple tables
that differ only in tablename, is a sign of *INCORRECT TABLE DESIGN*.

The way to do it would be with an Append Query followed by a Delete
Query, copying from table to table (not from subform to table). But
the need to do this suggests a flawed design. Could you explain what
you're trying to accomplish, and how your tables are set up?

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Hi John and thanks for your reply.

I know it sounds queasy but this is one way required by the other division
where I work to have some sort of tracking dbase for their enforcement and
regulatory branch. I have three tables: Company, License, and Machines.
One company may have many licenses - multiple licenses are required when new
machines are purchased. And one license may have many machines. So my form
boils down to a main form (company), subform (licenses), and subsubform
(machines) within subform. It is a privelege and in many instances where a
company buys other machines (such as poker machines) from another company.
So these machines need to be flagged down and transfer to another table
(company) who purchased these machines. That's how this division wanted it
to be. Please let me know if you think there is another better way of
structuring this kind of requirement. I really appreciate it John. And let
me know if you need additional information and I'll be happy to provide you.

Thanks.

Candiz
 
Hi John and thanks for your reply.

I know it sounds queasy but this is one way required by the other division
where I work to have some sort of tracking dbase for their enforcement and
regulatory branch.

That is still no excuse for incorrect table design.
I have three tables: Company, License, and Machines.
One company may have many licenses - multiple licenses are required when new
machines are purchased. And one license may have many machines. So my form
boils down to a main form (company), subform (licenses), and subsubform
(machines) within subform.

Don't confuse FORMS - a data display and editing tool - with TABLES -
the data storage medium. I presume you have Tables in a one to many
relationship as well?
It is a privelege and in many instances where a
company buys other machines (such as poker machines) from another company.
So these machines need to be flagged down and transfer to another table
(company) who purchased these machines.

So there is a DIFFERENT TABLE for each Company? That's what doesn't
make sense to me. There should be just the three tables you named.
Transferring ownership *should* simply be a matter of changing the
value of a Foreign Key from the old company to the new company.
That's how this division wanted it
to be. Please let me know if you think there is another better way of
structuring this kind of requirement. I really appreciate it John. And let
me know if you need additional information and I'll be happy to provide you.

Yes, some more information would be helpful. What are the Primary Keys
of these three tables? Or are there more tables? How are the tables
related? What information needs to be transferred, and from where, to
where? Examples with real or dummy data would be very helpful.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top