Hello, I am very new to Access and the googling I have done suggests that I use Dcount, but I can't get it to work.
I have a really simple table with just 2 field.
Type (unique - key - no duplicates - number)
Notes
Now as the user enters a new type I want to check the table to check they have not entered before.
But, I have the following and get 'type mismatch'
What should I be doing ?
Thanks
Code:
Dim TypeID As String
TypeID = Me.Type.Value
MsgBox TypeID
If DCount("[Typeid]", "tablecontacttype", "Type" > 0) Then
MsgBox TypeID
End If