Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fixed number of rows in report (2002)

    (Subject edited by HansV - "Access" was not very informative) <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Is it possible to add blank rows to a report? I am Producing Class Sheets for Horse Shows and in some cases there may be say 10 entries but i need to add rows contain no data up to a maximum(Total rows on a sheet) 20,
    ie Class with 3 entries add 17 blank rows, Class with 17 entries add 3 blank rows.
    Checked all the Help files and gone through the book Access 2002 found nothing or I have Missed It
    Any Ideas Cheers

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    See ACC2000: How to Print a Constant Number of Lines Per Group. This MSKB article describes how to do this and also contains a link to download a sample reports database that illustrates the method.

  3. #3
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed number of rows in report (2002)

    Thanks, downloaded templates put in the code substituted my data been trying for 2 days cannot get it to work i'm new to writing codes expressions etc must be doing something wrong, Have now given up

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    If you would still like to get help on this, explain where things go wrong in detail. We will be glad to help you.

  5. #5
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed number of rows in report (2002)

    Hans,
    I am following all the instruction as downloaded and even tried the Sample report download, using the Northwind DataBase,
    I am not sure as to how to assign a Module does it assign automatically or have to manually attach it,
    I don't need one lineI need complete rows see attached, Hope someone can Help
    Attached Images Attached Images

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    <P ID="edit" class=small>(Edited by HansV on 29-Jun-03 01:40. Added more detailed instructions.)</P>You can copy the module "Mod How To Print a Constant Number of Lines" from the sample database to your database, or you can import it into your database (File | Get External Data | Import). Change the 15 in the PrintLines function to 25.

    Open your report in design view. Make sure that the Properties window is visible (View | Properties) and activate the Events tab.

    Click in the group header for Class, then enter the following into the On Print event: =SetCount([Reports]![Your Report Name])
    Click in the Detail section, then enter the following into the On Print event: =PrintLines([Reports]![Your Report Name];[TotGrp])
    In both cases, replace "Your Report Name" by the name of your report.

    Put a text box with control source =Count(*) in the group header, set its Visible property to False, and name it TotGrp.

    If you manage to get the example working this way, it is not very difficult to adapt it to do what you want:
    Remove the line in the detail section (if you duplicated it from the example)
    Set the border style of the text boxes in the Detail section to transparent.
    Draw boxes (rectangles) around each text box; make sure that their border style is set to closed, and set their background style to transparent or send them to the background to make the contents of the text boxes visible.
    The boxes will be drawn the number of times specified in the PrintLines function.

  7. #7
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed number of rows in report (2002)

    Hans,
    Still no go been trying for past 4hrs. Will not save On print code in detail section. Do I have to alter Basic code in Module to match my report ie Syntax? i presume I have to alter the Products Text Box to match one of mine, cannot even get a line to work, if I change to rectangles how do I name them as control as it states in the Article to name line as Line control ,or is this only for Access 2000 I am using 2002Sp2. Sorry to bother you again but I feel like throwing my Computer through the window. Followed all your instructions. I must be doing something wrong

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    I'm afraid I can't help further without seeing the database. Can you post a stripped-down version of your database?
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]This will allow Loungers to take a look at what you have so far.

  9. #9
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed number of rows in report (2002)

    Hans,
    Zip Attached Still cant get it to work
    Attached Files Attached Files

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    You didn't follow the instructions closely enough.
    1. <LI>You didn't name the text box TotGrp, you just set the caption of its label to TotGrp. That doesn't change the name magically.
      <LI>You changed the line
      ElseIf TotCount > TotGrp And TotCount < 15 Then
      in the PrintLines function to
      ElseIf TotCount < TotGrp And TotCount > 15 Then
      This reversal of > and < causes it to do nothing!
      Moreover, to get 25 lines, you must change 15 to 25.
      <LI>The demo report contains just one text box ProductName in the detail section; your report has several; you must make all of them visible/invisible in the code.
      <LI>You didn't enter the function calls in the On Print events of the group header and detail sections.
      <LI>You didn't put rectangles around the text boxes.
      <LI>There was a box for Place, but it had a transparent border (and there was no corresponding text box)
    I have attached the modified database.
    Attached Files Attached Files

  11. #11
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed number of rows in report (2002)

    Hans,
    You are a genius I made a right mess of it, Only thing I need the Box for place has to return a blank box
    as this is filled in by the Judge on the day of the Show at Moment it is returning data ie the Place
    Sorry once again but I am new to writing code my previous attempts have not been as complex as this one
    Hope you can help

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    Just delete the text box named Place, and remove the code to make Place visible/invisible (there is a line R![Place].Visible = True and a line R![Place].Visible = False;both should be deleted.) See modified attached file.
    Attached Files Attached Files

  13. #13
    Star Lounger
    Join Date
    Jun 2003
    Location
    Hadfield, Derbyshire, England
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fixed number of rows in report (2002)

    Hans,
    You have saved me hours and hours thanks very much all works as i wanted.
    As I am new to this type i am not sure of what I am Working with can you recommend a book or something
    Microsoft Help not very informative it presumes you know what to do.
    I will leave you alone now <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> <img src=/S/joy.gif border=0 alt=joy width=23 height=23>

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Fixed number of rows in report (2002)

    I hope that others will recommend a book or books; I don't really know one that is ideal for beginning to learn Access.

  15. #15
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fixed number of rows in report (2002)

    Are you looking for a book on Access or on Access VBA? There are a number of books on Access 2002 and they generally indicate on the back cover whether they are beginning, intermediate or advanced. If you want one on Access VBA, you might still be able to find Beginning Access 2002 VBA, by Sussman, Smith, et al. There's also the Access 2002 VBA Handbook, by Novalis and Jones.
    Charlotte

Page 1 of 2 12 LastLast

Posting Permissions

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