Results 1 to 4 of 4

Thread: Dcount (2003)

  1. #1
    4 Star Lounger
    Join Date
    Feb 2006
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dcount (2003)

    Hi,

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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Dcount (2003)

    Try something like

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

  3. #3
    4 Star Lounger
    Join Date
    Feb 2006
    Posts
    504
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dcount (2003)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Dcount (2003)

    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>post 401925</post#> for instructions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •