Talismanic
Registered User.
- Local time
- Today, 18:12
- Joined
- May 25, 2000
- Messages
- 377
I am having trouble getting this DCount to work right. Here is the critera that I am trying to check for and how.
Tables name is Rates
Fields inside table are JobNo, Name, Time and Class
In the form I am working with I want to do a Dcount when txtPW = "Y" and the Class is not "Nor". I know there is something wrong with the logic in my code:
If txtPW = "Y" And Me!CLASS <> "Nor" Then
If DCount("[Class]", "Rates", "[JobNo]='" & Me![CLASS] & "'") = 0 Then
MsgBox "no match"
Else
MsgBox "found match"
End If
End If
I am getting the "no match" message whether there is one or not. What am I doing wrong?
[This message has been edited by Talismanic (edited 07-11-2001).]
Tables name is Rates
Fields inside table are JobNo, Name, Time and Class
In the form I am working with I want to do a Dcount when txtPW = "Y" and the Class is not "Nor". I know there is something wrong with the logic in my code:
If txtPW = "Y" And Me!CLASS <> "Nor" Then
If DCount("[Class]", "Rates", "[JobNo]='" & Me![CLASS] & "'") = 0 Then
MsgBox "no match"
Else
MsgBox "found match"
End If
End If
I am getting the "no match" message whether there is one or not. What am I doing wrong?
[This message has been edited by Talismanic (edited 07-11-2001).]