• Formula for Adding names on a report (XP)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Formula for Adding names on a report (XP)

    Author
    Topic
    #400448

    Hi,

    I have a report with a list of student names – two fields, last name and first name. I would like to have the total of students listed at the bottom of the report. I tried using COUNT for last names but I keep on getting a syntax error. Can anyone help me out? Thanks.

    Dorothy

    Viewing 1 reply thread
    Author
    Replies
    • #781326

      If it’s simply a syntax error, you might try:
      =Count([txtStudentName])
      replacing “txtStudentName” with the name of the text box on the report.

      • #781370

        Thank you. I gave it a try using the following: =Count([txtTbl Students.Last_Name]), as tbl Students.Last_Name is in the textbox of the detail portion of the report listing the last names. I am not getting a dialogue box stating that there is an error now, but when I open the report it shows the word error in the text box. Any ideas? Thanks again.

      • #781371

        Thank you. I gave it a try using the following: =Count([txtTbl Students.Last_Name]), as tbl Students.Last_Name is in the textbox of the detail portion of the report listing the last names. I am not getting a dialogue box stating that there is an error now, but when I open the report it shows the word error in the text box. Any ideas? Thanks again.

      • #781382

        Also tried =Count([Tbl Students.Last_Name]) and still shows “error” on the report in the text box.

        • #781392

          Are you certain of the text-box name? (view the report in design view and look at the exact name of the text-box containing the student names). I’m curious about this because the name you have entered is somewhat odd as far as naming conventions go. If what you have entered is exactly and precisely the name of the correct name of the text-box, then you may be trying to place the unbound text-box in the wrong area of the report – it should be in the page footer (or perhaps in a footer specific to the group you are trying to calculate). Post back if you are certain that you have named the reference correctly, because if you still experience an error it is likely caused by the location of the unbound text-box.

          • #781495

            Thank you, thank you, thank you. I had it in the page footer. Worked once I placed in the report footer. Yea!!!

          • #781496

            Thank you, thank you, thank you. I had it in the page footer. Worked once I placed in the report footer. Yea!!!

        • #781393

          Are you certain of the text-box name? (view the report in design view and look at the exact name of the text-box containing the student names). I’m curious about this because the name you have entered is somewhat odd as far as naming conventions go. If what you have entered is exactly and precisely the name of the correct name of the text-box, then you may be trying to place the unbound text-box in the wrong area of the report – it should be in the page footer (or perhaps in a footer specific to the group you are trying to calculate). Post back if you are certain that you have named the reference correctly, because if you still experience an error it is likely caused by the location of the unbound text-box.

        • #781443

          You must put the text box in the report footer, not in the page footer of the report. A simpler expression that counts records is

          =Count(*)

          • #781503

            Hans:

            Ooops. I meant report footer, but my fingers didn’t agree (too many irons in the fire here).
            Sorry if I mislead you Dorothy!
            innocent

          • #781504

            Hans:

            Ooops. I meant report footer, but my fingers didn’t agree (too many irons in the fire here).
            Sorry if I mislead you Dorothy!
            innocent

        • #781444

          You must put the text box in the report footer, not in the page footer of the report. A simpler expression that counts records is

          =Count(*)

      • #781383

        Also tried =Count([Tbl Students.Last_Name]) and still shows “error” on the report in the text box.

    • #781327

      If it’s simply a syntax error, you might try:
      =Count([txtStudentName])
      replacing “txtStudentName” with the name of the text box on the report.

    Viewing 1 reply thread
    Reply To: Formula for Adding names on a report (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: