how do create a command button on a form that will transfer that .

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Help please, Need to create a command button on a form that will transfer the
record in it entirety to another table.
 
Generally, this would not be a good idea. Waht are you trying to
accomplish? If you are trying to move the record to an archive table,
DON'T. Instead, add an "active" checkbox. If you have a separate table for
different buildings, or grades, or types, or warehouses, DON'T. Instead,
add a drop down to the records to pick the location/class/etc.

Post back if you need more details, or still want to move a record for some
reason.

Rick B
 
Hi, Proline.

There are many ways to do this, but probably the easiest way is to first
create an Append Query that inserts records from the Source table to the
Target table. Then in the Criteria row of the Primary Key, filter by the
value of the currently displayed record:

=Forms!YourFormName!YourPrimaryKeyControl

Then the command button's OnClick code is simply:

DoCmd.OpenQuery "qryAccountsTest", , acReadOnly

Hope that helps.
Sprinks
 
Hi rick,
Yes i am wanting to transfer the record to a acrhive table. new to access
understand checkbox but to make it active ?? expresion bulder macro or code
cheers paul
 
Back
Top