Results 1 to 2 of 2
  1. #1
    kavi is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2009
    Location
    Mauritius
    Posts
    1

    sum only if record number is more than one


    I want the sum result in the report footer to appear only if the record number is greater than one. How can I do that.

    Thanks

  2. #2
    CraigDolphin is offline Competent Performer
    Windows XP Access 2000
    Join Date
    Apr 2009
    Location
    Custer, WA, USA
    Posts
    125
    Reports are not my strong suit...but you may be able to use the On_Open Event (or maybe the On_Format Event) of the form to hide/show the result textbox depending on how many records are in the row source.

    Something like:
    Code:
    If DCount("*","SourceTableOrQueryNameHere") >=1 then
       Me.txtSumTotalTextBoxNameHere.Visible = True
    Else
       Me.txtSumTotalTextBoxNameHere.Visible = False
    End if
    It's air code and untested, and obviously you need to insert the correct object names as indicated, but it might be worth trying.

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

Similar Threads

  1. If duplicate record, go to original record
    By BigBear in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 02:58 AM
  2. Replies: 1
    Last Post: 03-12-2009, 09:55 AM
  3. Sum Of Positive Number and Negative Number
    By maysamab in forum Reports
    Replies: 1
    Last Post: 10-20-2008, 04:06 PM
  4. Deleting Record Contents, not complete record...
    By Charles Waters in forum Access
    Replies: 2
    Last Post: 06-24-2008, 12:00 PM
  5. Need help with an auto number
    By Wrangler in forum Database Design
    Replies: 1
    Last Post: 02-10-2006, 03:21 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