Log in

View Full Version : Append Query from form button



majaro
01-11-2008, 02:39 PM
I have a form that I am designing which I want the user to be able to press the delete form button and upon doing so would first append the entire record to another table and then a delete query to delete the record.

So the table I want to append from is called budget, the table I want to append to is called budget deleted.

Not being very good at VBA I was hoping someone could give me some sample to work from. Any help is appreciated. Thanks

rconverse
01-12-2008, 03:55 PM
I would suggest creating both queries in design view and making sure they are working as you would like.

Then right click on your "delete form" button (which I think is confusing - you might want to rename that button.) and scroll down to the "on click" event. Change that to "Event Procedure" and click on the "..." that appears. From there, you can simply enter the following:



Docmd.Runsql("query1")
docmd.Runsql("query2")


Why are you appending a record and then deleting a record? I am a little confused at what you are trying to accomplish.

HTH,
Roger