Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2016
    Location
    Chatsworth, GA (Northwest corner of state)
    Posts
    23

    Skipping Record with zero balance


    I am printing invoices and wish to exclude any with zero balances. Currently, the program works nicely except that it includes the zero ones.

    The Total for each invoice is located in the Report Header band of the subform and shows correctly.
    I have created a test command using

    =IIf([Total]=0,"Other Zero") works perfectly, but if I try to use:

    =IIf([Total]=0,DoCmd.GoToRecord , , acNext) It give me invalid syntax.
    I have tried surrounding the Do clause with (), but same results.

    I have suspected that the attempt to move to next record would have to be done from the main form rather than from the subform. Is that where it has to be executed. If so, is that the reason for 'invalid syntax'?

    Is there a different/better way to choose to skip a record?

    David

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You have a query for the record source for the invoices report?
    Without seeing the query, I would say to enter ">0" (don't enter the quotes) in criteria row for the column "Total".

    What you are trying to do is not include the records that are 0 in the report record source.

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

Similar Threads

  1. How To Get Running Balance Of Customer with last balance
    By muhammadirfanghori in forum Access
    Replies: 1
    Last Post: 10-25-2016, 03:31 PM
  2. General Ledger Query With Opening Balance and Running Balance
    By muhammadirfanghori in forum Queries
    Replies: 3
    Last Post: 03-12-2015, 07:17 AM
  3. Replies: 1
    Last Post: 03-29-2014, 10:19 AM
  4. Replies: 5
    Last Post: 01-03-2014, 02:07 AM
  5. Replies: 6
    Last Post: 03-19-2013, 10:28 AM

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