Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    8

    Question Unanswered: Report Problems...

    I've created a report that works relatively well and does everything I want it to accomplish accept for one bug that keeps coming up.

    In the report I have four subreports and in each I have a sum for the number of hours someone completed in that specific year of high school for community service (e.g. 10 hours for one project and 5 hours for another and I have a sum box that sums the project hours together), In order to meet graduation requirements a student must complete a certain number of hours their freshman year, sophmore year, etc.

    My problem arises in the if then statement I use under the sum box that states "Yearly requirements met?" followed by a box that should say yes or no based on whether they've met the requirements for that year and the cumilative requirements for the years up to that point. I've tried using nulls and the like, but nothing I do seems to work.

    here is the expression/formula i've been using that isn't working:

    Code:
    =IIf([3]+[Text24]>=25 & [3]>=15,"Yes","No")
    Note that I used the formula:

    Code:
    =nnz(Report.[Freshman Subtotal])
    to move the total from one subreport to the next, so could my problems possibly be from using this or from the first formula I used?

    Any help would be greatly appreciated

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Nz() simply converts any Null value to zero (case of a numeric field) or to a zero-length string (case of a text field), so it should not be the cause of a problem.

    More annoying: if, as I suspect, [3] is the name of a field or the name of a control, this is the potential cause of many troubles because you do not respect the naming rules of Access. Moreover you must use the And operator and not the & operator in the expression. & is an operator of concatenation. It merges two strings: "A" & "B" yield "AB".
    Have a nice day!

  3. #3
    Join Date
    Apr 2010
    Posts
    8
    all right, thanks for the help. I'll try it when I get to school tomorrow, and I've been meaning to rename the boxes, but i've been a bit lazy hehe.

  4. #4
    Join Date
    Apr 2010
    Posts
    8
    *Edit* after looking over it again I think I realized my problem and realized that I made a stupid mistake elsewhere in the report which I should be able to solve

    Thank you for your help, If I need any more help I know where to ask
    Last edited by bored; 04-23-10 at 20:44. Reason: problem (hopefully) solved

Posting Permissions

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