I set up an append query to transfer data in the event of CASH SALE when creating a SALES INVOICE and wanting to issue a RECEIPT. Because all the info is there, I want to spare the user the effort to create a RECEIPT. There is a button PROCESS RECEIPT and VBA result in the correct transfer of the needed fields. These documents(Sales Invoice and Receipt) have Main Forms and Sub Forms, so it must go through the Append query twice. When I present a develoment to my customer, I would like this action not to have the user clicking YES a few times, what is normal when one activate an append query. Is VBA the answer? My son and me have 500 videos, and he just finnished 3 years college in programming, but we are not there yet with VBA.
My current process.
a. There are Subqueries q04InvSales, and q04InvSalesSub.
b. The fields info in these subqueries get appended to tables t02Receipt and t02ReceiptSub.
c. When opening form f02InvSales the Invoice number is comitted by the time the invoice is completed, the Invoice number is in T006. It is used to filter the subquery so the current invoice info will be returned by these subqueries in a.
d. To try and keep it short I will name just two fields each. In q04InvSales there is LdgAcc_ID04 that should append to LdgAcc_ID08 in t02Receipt, and also CmbEnt_ID19 that should append to CmbEnt_ID18.
e. In q04InvSalesSub there is LdgAcc_ID05 that appends to LdgAcc_ID10 and CmbEnt_ID06 that appends to CmbEnt_ID12 in t02ReceiptSub.
f. It also appends the open Invoice number to t02Receipt. It is important that when the control is clicked it first checks whether the Invoice Number is already in InvSalID in the t02Receipt table. It should give a pop up message about not duplicating it.
There are a few more fields, but if I can be lead to understand how VBA can do it we will learn a lot. We are paranoid about user focus. Every click we can spare the user is important. When processing the invoice there are buttons GOTO RECEIPT, CREATE RECEIPT, MENU(to exit form), SAVE and PRINT etc. The consideration was to create the RECEIPT when click on MENU(exit). But I think the action best be done when the user is satisfied with the invoice to click the CREATE RECEIPT (cmd01) button. Is it possible doing this through VBA that Access will not ask the questions? Just click and RECEIPT is processed?
Thank you.