DCount Problem

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I have a DCount that isn't working, I think its the criteria part. Its
says missing Operator.

Me.Text18 = DCount("EmployeeID", "Employees", EmployeeID & " = Me.TextD")

I tried This Also..

Me.Text18 = DCount("EmployeeID", "Employees", "EmployeeID = Me.TextD")

This says Operation Cancelled

Any help, as always appreciated.
Thanks
DS
 
DS, I believe whats missing here are proper single quotes. try:
Me.Text18 = DCount("EmployeeID", "Employees", [EmployeeID] = "'" & Me.TextD&
"' ")
(it hard to see but there are single quotes before and after the Me.TextD
value)

/Jeff
 
DS, I spoke too soon. Here is the proper sequence. I tested it.
"[status] = '" & stat & "'")

Me.Text18 = DCount("EmployeeID", "Employees", "[EmployeeID] = ' " & Me.TextD
& "'"

/Jeff


Jeff said:
DS, I believe whats missing here are proper single quotes. try:
Me.Text18 = DCount("EmployeeID", "Employees", [EmployeeID] = "'" & Me.TextD&
"' ")
(it hard to see but there are single quotes before and after the Me.TextD
value)

/Jeff
I have a DCount that isn't working, I think its the criteria part. Its
says missing Operator.
[quoted text clipped - 10 lines]
Thanks
DS
 
Jeff said:
DS, I spoke too soon. Here is the proper sequence. I tested it.
"[status] = '" & stat & "'")

Me.Text18 = DCount("EmployeeID", "Employees", "[EmployeeID] = ' " & Me.TextD
& "'"

/Jeff


Jeff said:
DS, I believe whats missing here are proper single quotes. try:
Me.Text18 = DCount("EmployeeID", "Employees", [EmployeeID] = "'" & Me.TextD&
"' ")
(it hard to see but there are single quotes before and after the Me.TextD
value)

/Jeff

I have a DCount that isn't working, I think its the criteria part. Its
says missing Operator.

[quoted text clipped - 10 lines]
Thanks
DS
Thanks, Jeff.
That did it
DS
 
Back
Top