Hi!
I have an entry-form, where I add records to my database. When I fill in a S/N (which has to be unique) and I would like to have a VB-code to check for duplicates in that field.
The S/N looks liks follows 4-700-1.0250009. I have a code
Dim rs As Object
Dim svar
Set rs = Me.Recordset.Clone
rs.FindFirst "[S/N] = '" & Str(Nz(Me![Inskjut], 0)) & "'"
If rs.NoMatch Then
But I get a run-time error '13' type missmatch
Please help!!!
Thanks
I have an entry-form, where I add records to my database. When I fill in a S/N (which has to be unique) and I would like to have a VB-code to check for duplicates in that field.
The S/N looks liks follows 4-700-1.0250009. I have a code
Dim rs As Object
Dim svar
Set rs = Me.Recordset.Clone
rs.FindFirst "[S/N] = '" & Str(Nz(Me![Inskjut], 0)) & "'"
If rs.NoMatch Then
But I get a run-time error '13' type missmatch
Please help!!!
Thanks