• Dcount (2003)

    Author
    Topic
    #431761

    Hi,

    I currently use Dcount to validate data that user enter in search menu is exit in the table. It

    Viewing 0 reply threads
    Author
    Replies
    • #1011286

      Try something like

      If DCount(“*”, “tblRequestInformation”, “[Name]=Forms!frmSearchCases!Name) = 0 Or DCount(“*”, “tblWorksheet”, “[Initials]=Forms!frmSearchCases!Initials) = 0 Then

      • #1011291

        Hi Hans,

        Thank you for help. But I got error message after I tried the codes that you provide. Please see below the error message:

        Run-time error ‘2001’:
        You cancelled the previous operation.

        Thanks

        Regards

        • #1011293

          Without seeing the database, it’s hard to know what causes this. Check the spelling of the names in the expression very carefully, and see if the code works if you temporarily remove one of the DCounts.

          If that doesn’t help, could you post a stripped down copy of your database? See post 401925 for instructions.

    Viewing 0 reply threads
    Reply To: Dcount (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: