Move a record in a form to another form

strong888hold

New member
Local time
Today, 11:18
Joined
Nov 29, 2006
Messages
6
Hi,

I created a small database and on my form (frmGE), I added a button "Delete". This button have to move the record (just the actual record and not all records) to the form "FrmRetired". The form "FrmRetired" have the same fields, except for the "comment" field.
I tried to programm it so when i click on it, the record will be moved to the "FrmRetired" and by the same time, the record will be deleted from the form "frmGE"

I created a ADD query, but I missed something...then for the "Delete" button, I added this code
Code:
Private Sub Move_data_click()
DoCmd.OpenQuery "QueryMove", acViewNormal, acReadOnly
EndSub

Any help will be appreciated.

Thanks

strong888hold
 
What you are trying to do is move a record from 1 table to another. Not from one form to another.

To "move" the record from your "Main" table to your "History" table, use an append query and then run a delete query to remove the record from the main table.

OR

You can just "flag" the record in the "Main" table so that it does not appear. (use a check box).
 
Yes, one record from a table to another table. I put a command button on my form (see frmSource). This button should move the record to the frmDestination. It seems that my SQL code is not working and I don't know what else I can do.

There's a sample of my database. Open the frmSource, then open "Deplacer" button properties and go to "OnClick" then "Event procedure" to see my code.
I appreciate your help in any way

strong888hold
 

Attachments

Users who are viewing this thread

Back
Top Bottom