Question:

To Search First Whether Similar Data Exists under a Field in Microsoft Access!!!

by  |  earlier

0 LIKES UnLike

To Search First Whether Similar Data Exists under a Field in Microsoft Access!!!

 Tags:

   Report

1 ANSWERS


  1. Use DCount:

    in VBA, and assuming that the field is a text datatype and you're looking for value 'TestValue' in field 'FieldName' in table or query 'TableOrQueryName', it's

    If (DCount("[FieldName]","TableOrQueryName"... " & TestValue & " ' ") = 0) Then

        there's no such value

    Else

        there's at least one value

    End If

    Omit the spaces between the " and the '.

    There's a similar solution usng Access's own macro language: let me know through "Further Details" if you need that.

    Hope that helps.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions