D
Dave Elliott
It says the expression I intered has an invalid date
=Dcount([EmployeeID], "Employees", [EmployeeId] > '2' And
[WorkDate]=#??/??/????#)
=Dcount([EmployeeID], "Employees", [EmployeeId] > '2' And
[WorkDate]=#??/??/????#)
Wayne Morgan said:Is this exactly what you entered? If so, then question marks aren't a
date. Also, is EmployeeId a text or numeric field? The syntax you are
showing indicates a text field.
For DCount to work properly, all three parameters need to be passed as
strings.
=DCount("[EmployeeID]", "Employees", "[EmployeeId] > '2' And [WorkDate] =
#??/??/????#")
This is assuming that you're just using the question marks as place
holders for your example. Remove the single quotes from around the 2 if
EmployeeId is a numeric field. Are you trying to concatenate any values
into the function?
--
Wayne Morgan
MS Access MVP
Dave Elliott said:It says the expression I intered has an invalid date
=Dcount([EmployeeID], "Employees", [EmployeeId] > '2' And
[WorkDate]=#??/??/????#)
Wayne Morgan said:Is this exactly what you entered? If so, then question marks aren't a
date. Also, is EmployeeId a text or numeric field? The syntax you are
showing indicates a text field.
For DCount to work properly, all three parameters need to be passed as
strings.
=DCount("[EmployeeID]", "Employees", "[EmployeeId] > '2' And [WorkDate] =
#??/??/????#")
This is assuming that you're just using the question marks as place
holders for your example. Remove the single quotes from around the 2 if
EmployeeId is a numeric field. Are you trying to concatenate any values
into the function?
--
Wayne Morgan
MS Access MVP
Dave Elliott said:It says the expression I intered has an invalid date
=Dcount([EmployeeID], "Employees", [EmployeeId] > '2' And
[WorkDate]=#??/??/????#)
Dave Elliott said:Also, Wayne, the data is form 2 tables.
EmployeeID is form the Employees Table
Work Date is from the Hours table
the form I want to do this calculations uses both tables in the query
Time_Hours is the name of the query
Wayne Morgan said:Is this exactly what you entered? If so, then question marks aren't a
date. Also, is EmployeeId a text or numeric field? The syntax you are
showing indicates a text field.
For DCount to work properly, all three parameters need to be passed as
strings.
=DCount("[EmployeeID]", "Employees", "[EmployeeId] > '2' And [WorkDate] =
#??/??/????#")
This is assuming that you're just using the question marks as place
holders for your example. Remove the single quotes from around the 2 if
EmployeeId is a numeric field. Are you trying to concatenate any values
into the function?
--
Wayne Morgan
MS Access MVP
Dave Elliott said:It says the expression I intered has an invalid date
=Dcount([EmployeeID], "Employees", [EmployeeId] > '2' And
[WorkDate]=#??/??/????#)