Try the attached db. Post back with any questions.
Try the attached db. Post back with any questions.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
Now that I've seen your tables I see that it's not that simple. However, you can have this query
which would be called by this queryCode:SELECT PAYROLL.FULL_NAME, PAYROLL.BANK, PAYROLL.ACCOUNT_No, PAYROLL.POSITION, PAYROLL.BASIC_SALARY, PAYROLL.SSF, PAYROLL.TAX, PAYROLL.NET_SALARY, PAYROLL.PAYROLL_MONTH FROM PAYROLL WHERE (((PAYROLL.PAYROLL_MONTH)=[Enter Month To Copy As 01/2023]));
EDIT - Forgot to mention that select query would have to be namedCode:INSERT INTO PAYROLL (FULL_NAME, BANK, ACCOUNT_No, [POSITION], BASIC_SALARY, SSF, TAX, NET_SALARY, PAYROLL_MONTH) SELECT qryCopyMonthData.FULL_NAME, qryCopyMonthData.BANK, qryCopyMonthData.ACCOUNT_No, qryCopyMonthData.POSITION, qryCopyMonthData.BASIC_SALARY, qryCopyMonthData.SSF, qryCopyMonthData.TAX, qryCopyMonthData.NET_SALARY, Month(DateAdd("m",1,[PAYROLL_MONTH])) & "/" & Year([PAYROLL_MONTH]) AS AppendMonth FROM qryCopyMonthData;
qryCopyMonthData, otherwise change this name to your select query name in the append query.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Another edit: @Bob, not trying to butt in. Didn't see your post in spite of the delay and that's because of antiquated forum software I guess.
I also didn't even look at the form in OP's db, so now I see that rather than using a parameter prompt, a form field reference would be better.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
ThanksNow that I've seen your tables I see that it's not that simple. However, you can have this query
which would be called by this queryCode:SELECT PAYROLL.FULL_NAME, PAYROLL.BANK, PAYROLL.ACCOUNT_No, PAYROLL.POSITION, PAYROLL.BASIC_SALARY, PAYROLL.SSF, PAYROLL.TAX, PAYROLL.NET_SALARY, PAYROLL.PAYROLL_MONTH FROM PAYROLL WHERE (((PAYROLL.PAYROLL_MONTH)=[Enter Month To Copy As 01/2023]));
EDIT - Forgot to mention that select query would have to be namedCode:INSERT INTO PAYROLL (FULL_NAME, BANK, ACCOUNT_No, [POSITION], BASIC_SALARY, SSF, TAX, NET_SALARY, PAYROLL_MONTH) SELECT qryCopyMonthData.FULL_NAME, qryCopyMonthData.BANK, qryCopyMonthData.ACCOUNT_No, qryCopyMonthData.POSITION, qryCopyMonthData.BASIC_SALARY, qryCopyMonthData.SSF, qryCopyMonthData.TAX, qryCopyMonthData.NET_SALARY, Month(DateAdd("m",1,[PAYROLL_MONTH])) & "/" & Year([PAYROLL_MONTH]) AS AppendMonth FROM qryCopyMonthData;
qryCopyMonthData, otherwise change this name to your select query name in the append query.
We give you guys feedback soon
No problemAnother edit: @Bob, not trying to butt in. Didn't see your post in spite of the delay and that's because of antiquated forum software I guess.
I also didn't even look at the form in OP's db, so now I see that rather than using a parameter prompt, a form field reference would be better.
The db that I last posted uses recordsets to get the job done. It works, I think but I'm sure the OP will advise. I did originally try using an append query but ran into problems. I suspect that running queries might be faster than using recordsets although I don't know by how much. With a small number of employees the speed might not matter.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
First of all, i will like to appreciate you all for such a great work done. Especially to those who took time to type codes and also check my db to assist me. I tested the db that i received from here and it worked perfectly the way i wanted it.
I went further to add more fields which i will need for my system and followed similar procedure in the db to this new one i created.
But for some reasons, it is giving me an error which i find difficult to understand.
I Think it may need a little touch and will be glad if it could be checked for me.
Thanks to you all for such an amzing work so far
Try the attached db:First of all, i will like to appreciate you all for such a great work done. Especially to those who took time to type codes and also check my db to assist me. I tested the db that i received from here and it worked perfectly the way i wanted it.
I went further to add more fields which i will need for my system and followed similar procedure in the db to this new one i created.
But for some reasons, it is giving me an error which i find difficult to understand.
I Think it may need a little touch and will be glad if it could be checked for me.
Thanks to you all for such an amzing work so far
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
I'm glad that you have a solution and have gained some knowledge.
BTW I'm not a fan of calculated fields in tables. I prefer NOT to store calculations in tables but have them in queries and redo the calculation whenever and wherever it is required.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
Noted
Will give that a try one of these days and see how it goes