i have couple of questions
1: i want to copy some data say for a particular date then update the date and then re-insert it into the table as new entries without modifying the original data ..i'll explain more .. i have a table which store interest rates about a bank . i entered data for one bank manually , now instead of entering each bank's data manually what i want is to copy the current data just update the bank name from the form and then re-insert it into the same table . the result should be that i should have 2 banks in my table ( this is just an example so forget about interest rates difference etc.. just a picture of what i want to do )
i update my table through a query and a form .. i have this ok button which runs the query and then a message box confirming it .. but the problem is that if some how my records dont get updated i still get the message confirmation.. how to handle this ..
Just before your VBA runs the query, insert the following line
This will force you to confirm that you want to run the query, and it will also tell you how many records are being appended, updated, deleted, or whatever, and force you to confirm that you want SQL to actually perform the transaction.
You can then insert code (after the query runs) to turn off warnings.
You can thus get rid of the confirmation line you currently have.