I only see the need for two queries (maybe I missed something). I see an append query from A to B and then an update query on A using the same criteria as the append query. Yes, I think a function would be a great idea, especially if this is going to be something done frequently, maybe assigned to a button on a form. I would create your two queries, and the form with a button to do it. Then, in the events property of the button, click on the elipse (...) and bring up the code window. You will need to use the DoCmd.RunQuery methods. You should be able to get a really good example of that in the Help.
Now that I think of it, do you need to do this? Are table A and table B duplicate structures? Either way, it would seem you have some redundancy of data. If you post the structures here, we might be able to help you help yourself...
Hope that helps... Terry M. Hoey