Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246

    Unanswered: DCount not working

    Hi,
    I'm trying to use DCount in a macro to evaluate if the form is to close or a error message box is to be displayed, but for some reason the macro isn't evaluating correctly, probably due to the syntax of DCount, can anyone help out.

    The evaluation is as follows

    DCount("[Tech]","Technician_Accounts","[Tech] = 'Review'>0")

    Regards
    John

  2. #2
    Join Date
    Feb 2004
    Posts
    142
    if 0 > DCount("[Tech]","Technician_Accounts","[Tech] = 'Review') then

    take some action
    endif
    KC

  3. #3
    Join Date
    Feb 2004
    Posts
    142
    Originally posted by AZ KC
    if 0 > DCount("[Tech]","Technician_Accounts","[Tech] = 'Review') then

    take some action
    endif
    DCount("[Tech]","Technician_Accounts","[Tech] = 'Review'")
    KC

  4. #4
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246
    Hi,
    Thanks for the help, I changed my syntax to the following and it now works correctly

    DCount("[Tech]","Technician Accounts","[Tech] = 'Review'")=0

    Regards
    John

Posting Permissions

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