Your DCount() was malformed, as has been said, and needs to be corrected, but the problem is more complex than just the part that John has pointed out, with the > 0 having to be outside of the DCount()!
You state that the Field name is Type, and that is what needs to be used in the DCount, not TypeID, which is a Variable! It should be
Code:
If DCount("[Type]", "tablecontacttype", "Type = " & Me.Type) > 0
Also, your malformed DCount actually wasn't what caused the 'type mismatch' error! That was caused by these two lines:
Code:
Dim TypeID As String
TypeID = Me.Type.Value
TypeID is declared to be a String Variable, which is to say it is Text, but you then assign the Value of Me.Type to it, and Type is defined as a Number; hence the 'type mismatch!'
BTW, Type is a Reserved Word, in Access, and should not be used as the name of a Control or Field! Doing so is likely to not only create problems, but create problems that will be very difficult to debug!
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007