View Full Version : Auto append


TallMan
01-16-2009, 12:28 PM
Hey Guys,


I have a table that has a field title "subcat". What I would like to have happen is if sun cat changes to one of 15 different codes to have it automatically append into a table. This table would need to keep appending data from the previous day.

Eaxample would be on 1/15/09 5 account's "Subcats" change to one of 15 different choices. the next morning this information is automatically appended into a subcat change table. then on 1/16/09 13 accounts have a subcat change and they are added to the "subcat change" table.

I would need the table to keep compiling and not deleting the previous days table.

Is there anyway to do this??????

John Big Booty
01-16-2009, 12:40 PM
Use an Append query. Start of with a select query and ensure that it is collecting the data you wish to append to your table. Once you are happy that your query is working correctly, click on the query type button in the main tool baR, and select Append query. Once you have done that you will get a pop up box from which you can choose the table you wish to append the data to. Once you have selected you table you will see a new row appear in the query grid, "Append To". Access will automatically match any field with the same name. You can change this as you wish.

TallMan
01-16-2009, 12:47 PM
Thank you for the information. I guess I am wondering if there is an automated way to make this happen so that if anything changes in the subcat field it is automatically appended the next day to the change of subcat table....

John Big Booty
01-16-2009, 01:14 PM
Sure, you just need to fire the query in the OnChange event of the Control.

docmd.OpenQuery "QRY_Name"