smtazulislam
Member
- Local time
- Today, 05:56
- Joined
- Mar 27, 2020
- Messages
- 808
Hello everyone,
I try to create a successfully database for payroll. Before I have 2 threads for payroll resolving issue, and one thread is pending yet . Alhamdullillah, I solved with out side help. Now I have another problem.
I have 3 tables with each table have a "Total" filed. See in the attached sample picture.
Firstly, I try to insert from FORM field "Total" value via the vba code. Like....
But working.
Secondly, I try to create a query tblPayroll table with DELETE filed of "RED COLOR" and JOIN on 3 tables. but here dont display record. Because Maybe some table are not data. e.g. many employee dont have "allowance" and many employee dont have "deduction". so it was sometimes is blank.
Thirdly, I try to a UPDATE button for a vba to INSERT in tblPayroll where sql dont file the ID
I want to your support advice what is the best ways to keep data in the future and how can I resolve my problem ?
Any help will be appreciate.
I try to create a successfully database for payroll. Before I have 2 threads for payroll resolving issue, and one thread is pending yet . Alhamdullillah, I solved with out side help. Now I have another problem.
I have 3 tables with each table have a "Total" filed. See in the attached sample picture.
Firstly, I try to insert from FORM field "Total" value via the vba code. Like....
Code:
Private Sub TotalDeductions_AfterUpdate()
Me.TotalDeductions = Me.txtDeductions.Value
End Sub
Secondly, I try to create a query tblPayroll table with DELETE filed of "RED COLOR" and JOIN on 3 tables. but here dont display record. Because Maybe some table are not data. e.g. many employee dont have "allowance" and many employee dont have "deduction". so it was sometimes is blank.
Thirdly, I try to a UPDATE button for a vba to INSERT in tblPayroll where sql dont file the ID
Code:
Private Sub cmdUpdate_Click()
Dim sql As String
sql = "INSERT INTO tblPayroll.PayRollID, tblPayroll.EmployeeID, tblPayroll.PayrollYear, tblPayroll.PayrollMonth, tblPayroll.WorkedDays, tblPayroll.TotalAbsentdays, tblPayroll.TotalAllowances, tblPayroll.GrossSalary, tblPayroll.TotalDeductions, tblPayroll.TotalOvertime, tblPayroll.CashAdvance, tblPayroll.NetSalary, tblPayroll.PaymentType" & _
"FROM tblPayrol"
DoCmd.RunCommand acCmdSave
MsgBox "You data has been saved !"
End Sub
I want to your support advice what is the best ways to keep data in the future and how can I resolve my problem ?
Any help will be appreciate.