Results 1 to 3 of 3
  1. #1
    Paintballlovr is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    96

    formula help

    I've inherited this formula, which works, but I'm not sure how/if I can modify it. I would like the formula to use a criteria of a checkbox field being marked or not. Here is the current code:



    =IIf([Forms]![Cashier Batch Control Ticket]![Check_RefNum] Is Null,"",(DSum("Amt_Split","tblMaster_835","((Check _RefNum='" & [Forms]![Cashier Batch Control Ticket]![Check_RefNum] & "') AND ((File_Split Like '*/hbremit*') AND (File_Split Like '*/TNMC835HB')))")))


    As an example, there are two files in tblmaster_835 with the same Check_RefNum. The system marked one of them as DupConfirmed as it should, but I want the formula to not include DupConfirmed records in it's sum. The above formula is showing twice the value that should be displayed. I tried:

    =IIf([Forms]![Cashier Batch Control Ticket]![Check_RefNum] Is Null,"",(DSum("Amt_Split","tblMaster_835","((Check _RefNum='" & [Forms]![Cashier Batch Control Ticket]![Check_RefNum] & "') AND ((File_Split Like '*/hbremit*') AND (File_Split Like '*/TNMC835HB' AND (DupConfirmed=’NO’))))")))

    any ideas?

  2. #2
    Dal Jeanis is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    I think you just missed the location of one right parenthesis:
    Code:
    =IIf([Forms]![Cashier Batch Control Ticket]![Check_RefNum] Is Null,"",(DSum("Amt_Split","tblMaster_835","((Check _RefNum='" & [Forms]![Cashier Batch Control Ticket]![Check_RefNum] & "') AND ((File_Split Like '*/hbremit*') AND (File_Split Like '*/TNMC835HB') AND (DupConfirmed=’NO’)))")))

  3. #3
    Paintballlovr is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    96
    Thank you very much. You beat me to the punch as I figured out my mistake and was coming in to close out my post.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Please help with formula
    By JeanZander in forum Database Design
    Replies: 2
    Last Post: 01-07-2013, 04:39 PM
  2. Please help with this formula.
    By vickan240sx in forum Access
    Replies: 3
    Last Post: 09-17-2012, 03:44 PM
  3. Formula
    By Ray67 in forum Queries
    Replies: 53
    Last Post: 08-09-2012, 01:56 AM
  4. Formula mod help
    By jcaptchaos2 in forum Access
    Replies: 2
    Last Post: 04-25-2011, 02:55 PM
  5. Formula
    By hschrunk in forum Access
    Replies: 3
    Last Post: 05-18-2010, 01:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums