motleyjew
Registered User.
- Local time
- Today, 09:24
- Joined
- Jan 11, 2007
- Messages
- 109
I am having a issue with a dcount not working properly.
The table is called tblMain
In this table is a field called clientid as text
I am delcaring a field in my database called client as a string
Here is the current code:
'''''''''''''''''''''''''''''''''''''''''''''''
Dim client As String
client = Mid([ID], InStr([ID], "client_id=") + 10, IIf(Mid([ID], InStr([ID], "client_id=") + 17, 1) = "&", 7, 8))
If DCount("[clientid]", "[tblMain]", "'client' = [tblMain]![clientid]") >= 1 Then
MsgBox "Duplicate Client ID"
End If
''''''''''''''''''''''''''''''''''''''''''''''''
When I put my curser over "client" and [tblMain]![clientid], i am getting a matching number for the results. For some reason it is not counting it. I have a feeling it has something to do with the single quotes arount client. Looking for any help.
Thanks
Gregg
The table is called tblMain
In this table is a field called clientid as text
I am delcaring a field in my database called client as a string
Here is the current code:
'''''''''''''''''''''''''''''''''''''''''''''''
Dim client As String
client = Mid([ID], InStr([ID], "client_id=") + 10, IIf(Mid([ID], InStr([ID], "client_id=") + 17, 1) = "&", 7, 8))
If DCount("[clientid]", "[tblMain]", "'client' = [tblMain]![clientid]") >= 1 Then
MsgBox "Duplicate Client ID"
End If
''''''''''''''''''''''''''''''''''''''''''''''''
When I put my curser over "client" and [tblMain]![clientid], i am getting a matching number for the results. For some reason it is not counting it. I have a feeling it has something to do with the single quotes arount client. Looking for any help.
Thanks
Gregg