Im getting this error: Arguments are of the wrong type, out of range or are in conflict with another
Here's my code:
rivate Sub cmdPrintSel_Click()
Call Con("Database.mdb")
RecSet.Open "Select Payroll.EM_ID, Payroll.EM_Name, Payroll.EM_Dep, Payroll.Monthly_Rate, Payroll.dDate, Payroll.xBonus, Payroll.xOT, Payroll.GSIS, Payroll.PH, Payroll.InTax, Payroll.Others, Payroll.absences, Payroll.Advances, Payroll.NetPay " & _
"From Payroll where EM_ID =" & lvwInfo.SelectedItem.Text & " Group By Payroll.EM_ID, Payroll.EM_Name, Payroll.EM_Dep, Payroll.Monthly_Rate, Payroll.dDate, Payroll.xBonus, Payroll.xOT, Payroll.GSIS, Payroll.PH, Payroll.InTax, Payroll.Others, Payroll.absences, Payroll.Advances, Payroll.NetPay having Month(dDate)='" & Month(dt1.Value) & "' And Day(dDate)='" & Day(Me.dt1.Value) & "' And Year(dDate)='" & Year(dt1.Value) & "' Order By Payroll.EM_ID;", DBLink, adOpenKeyset, adLockPessimistic
Set drtSel.DataSource = RecSet
drtSel.Show 1
RecSet.Close
DBLink.Close
End Sub
Can u tell me where i am getting the error, might be in my database.