Forum Discussion
Ms Access different results from same query on different pc's
- Feb 26, 2020
Gertdj And where are the positioned? It could be decimals normally having a dot, now a comma as the decimal separator. Always convert decimals to text with Str:
TextValue = Str(DecimalValue)
Gertdj How about posting the query?
- M_A_M_AFeb 23, 2020Copper ContributorY detalles de versiones de las dos maquinas... Pero empezar viendo esa consulta... Parece ser un buen primer paso.... (Mi respuesta es solo suposición, incluyendo supuestamente que la cons. está correcta....)
- GertdjFeb 26, 2020Copper Contributor
strSql2 = "INSERT INTO tbl_PayRun ( PerId, PayDate, HoursWorked, KmTravelled, HourlyRate, TravelRatePerKm, TotalWorked, TotalKmTravelled, TravelCostAmount, TotalEarnings, TaxRate, Tax, UIFEmployee, UIFEmployer, TotalDeductions, NettPay )" & vbCrLf & _
"SELECT Q_Earnings_Captured.PerId," & vbCrLf & _
strPayDate & "," & vbCrLf & _
"Q_Earnings_Captured.HoursWorked," & vbCrLf & _
"Q_Earnings_Captured.KmTravelled," & vbCrLf & _
"Q_Earnings_Captured.HourlyRate," & vbCrLf & _
"Q_Earnings_Captured.TravelRatePerKm," & vbCrLf & _
"Q_Earnings_Captured.TotalWorked," & vbCrLf & _
"Q_Earnings_Captured.TotalKmTravelled," & vbCrLf & _
"Q_Earnings_Captured.TotalTRavelCost," & vbCrLf & _
"Q_Earnings_Captured.TotalEarnings," & vbCrLf & _
"tbl_Rates.TaxRate," & vbCrLf & _
"[TotalEarnings]*[TaxRate] AS PAYE" & "," & vbCrLf & _
UIF_Actual & " AS UIF_EE," & vbCrLf & _
UIF_Actual & " AS UIF_ER," & vbCrLf & _
"[PAYE]+[UIF_EE] AS TotalDeductions," & vbCrLf & _
"[TotalEarnings]-[TotalDeductions] AS NettPay" & vbCrLf & _
"FROM Q_Earnings_Captured INNER JOIN tbl_Rates ON Q_Earnings_Captured.PerId = tbl_Rates.PerId" & vbCrLf & _
"Where Q_Earnings_Captured.PerId = " & rs1!PerId- Gustav_BrockFeb 26, 2020Brass Contributor
Gertdj It could be strPayDate. It should be formatted like:
strPayDate = "#" & Format(PayDate, "yyyy\/mm\/dd") & "#"
- GertdjFeb 26, 2020Copper Contributor
Gustav_Brock Thank you - I will try that, but want to state again that the code works perfectly on two pc's and is only producing extra output fields on the third...