I am trying to get login and logout time as it relates to an employeeid and the Start and End dates of a pay period from table tbllogInOut. The first part of the criteria works fine in regards to the employeeID but I am having trouble with the start and end dates of the pay period. The statement below is what I have in a text box control source
This is the portion of the statement that is not functioning because it's giving be the total hours of all data inputted in the table instead of basing it on the criteria I want.
Any ideas on how to resolve this issue?
Newbie in search of knowledge
Code:
=Format(DSum("(([logout]-[login])*24)","tblLogInOut",[employeeID]=Reports!rptBiWeekly!txtEmployeeID And ([workdate] Between Forms!frmloginout!txtStartDate And Forms!frmloginout!txtEndDate)),"#.00")
This is the portion of the statement that is not functioning because it's giving be the total hours of all data inputted in the table instead of basing it on the criteria I want.
Code:
And ([workdate] Between [Forms]![frmloginout]![txtStartDate] And [Forms]![frmloginout]![txtEndDate])
Any ideas on how to resolve this issue?
Newbie in search of knowledge