Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    I have a very weird scenario going on. I have created a database to track my activities that I have to turn in to my supervisors here at the hospital. I've created a report to print to turn in, but everytime I print it, it wants to print 38 copies of the report, even when I tell it only to print one copy from the print window. Any ideas on what I may have done in creating my tables, form, or report to trigger this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    What do you see in print preview?

    If you see 38 copies of the report there, the record source of the report probably contains an incorrect join.

    If you see only one copy of the report in print preview, the printer might be set to print 38 copies of everything, but that would affect other print jobs too.

  3. #3
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='784909' date='16-Jul-2009 09:10']What do you see in print preview?

    If you see 38 copies of the report there, the record source of the report probably contains an incorrect join.

    If you see only one copy of the report in print preview, the printer might be set to print 38 copies of everything, but that would affect other print jobs too.[/quote]

    On print preview, I see only 1 page. When I print from other Office products (Outlook, Word, and Excel), everything prints normally.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I have no idea why print preview and print would produce different results.

    If you wish, you can attach a stripped down and zipped copy of the database. Remove sensitive information from the copy.

  5. #5
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='784952' date='16-Jul-2009 13:00']I have no idea why print preview and print would produce different results.

    If you wish, you can attach a stripped down and zipped copy of the database. Remove sensitive information from the copy.[/quote]

    Here is the file. There is no patient/personal specific info there, so you'll get the entire package.
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I do get 38 identical pages in print preview, and the cause is easy to see: your report displays summary information about tblCurrent in the detail section. Since the report is bound to tblCurrent, you get one detail section for each of the 38 records in the table.

    As a workaround, you could move all controls from the detail section to the page header section, and set the height of the detail section to 0.

    Alternatively, create a query that returns the summary information, and use that as record source for the report.

  7. #7
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='784955' date='16-Jul-2009 13:27']I do get 38 identical pages in print preview, and the cause is easy to see: your report displays summary information about tblCurrent in the detail section. Since the report is bound to tblCurrent, you get one detail section for each of the 38 records in the table.

    As a workaround, you could move all controls from the detail section to the page header section, and set the height of the detail section to 0.

    Alternatively, create a query that returns the summary information, and use that as record source for the report.[/quote]

    I still learning all this terminology and such. Where did I put in this summary information? In the textbox for the sub of all the replies for each Clinical Indicator? The sum of all the clinical indicators at the bottom? Somewhere else I didn't realize? I'm kinda lost at what you mean.

  8. #8
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='kyhawkeye' post='785008' date='17-Jul-2009 14:06']I still learning all this terminology and such. Where did I put in this summary information? In the textbox for the sub of all the replies for each Clinical Indicator? The sum of all the clinical indicators at the bottom? Somewhere else I didn't realize? I'm kinda lost at what you mean.[/quote]
    Have a look at the attachment. In report design, I have added a Report footer, then moved all your stuff from the Detail Section to the Report footer. The total still does not work, but it did not work in yours either. You need to add the Abs(Sum etc for all the fields.
    Attached Files Attached Files
    Regards
    John



  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The text boxes in your report do not display information about individual records. The control source of the text boxes is of the form =Abs(Sum(...)); this computer the count of something. So you do *not* want output for each record.

    The detail section of a report will be repeated for each record in the record source. You do not want that here.

  10. #10
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='785032' date='17-Jul-2009 04:53']The text boxes in your report do not display information about individual records. The control source of the text boxes is of the form =Abs(Sum(...)); this computer the count of something. So you do *not* want output for each record.

    The detail section of a report will be repeated for each record in the record source. You do not want that here.[/quote]


    Would I be better off using the Expr1(count 8) query to count each clinical indication? I originally created those for each one, but could not figure out how to put those on the report. What is the best way to put the totals for each clinical indication and the total count onto the report?

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I have attached John's version with the end total modified.

    By the way, I would use a different table structure, with three tables:
    - A main table for client info.
    - An items table listing the possible items, such as "Inappropriate drug" etc.
    - A table that has a record for each item that actually occurs for a client (if there is a Yes in tblCurrent, there will be a record in this table).

    I have left the append query and the VBA code that I used to fill these tables from tblCurrent in the database.

    With this structure, it's easy to create a totals query that counts occurrences, and use this as record source for a report. This new report is also in the database.
    Attached Files Attached Files

  12. #12
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='785121' date='17-Jul-2009 15:25']I have attached John's version with the end total modified.

    By the way, I would use a different table structure, with three tables:
    - A main table for client info.
    - An items table listing the possible items, such as "Inappropriate drug" etc.
    - A table that has a record for each item that actually occurs for a client (if there is a Yes in tblCurrent, there will be a record in this table).

    I have left the append query and the VBA code that I used to fill these tables from tblCurrent in the database.

    With this structure, it's easy to create a totals query that counts occurrences, and use this as record source for a report. This new report is also in the database.[/quote]

    So, upon looking at this version, how would you suggest I create the form to input the Clinical Interventions? Do I use the same form as before? If not, how do I use the new tables and/or queries to create a new input form to record as I was before? I learn best by doing, so if you can point me in the right direction, I'll work it from there.

  13. #13
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You'd use a main form bound to tblMain and a subform bound to tblResults (or to a query based on tblResults and tblItems). The subform would be linked to the main form by the Client field.

    See this post for an example of how to handle data entry for a many-to-many relationship with a main form and subform.

  14. #14
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='785730' date='22-Jul-2009 08:15']You'd use a main form bound to tblMain and a subform bound to tblResults (or to a query based on tblResults and tblItems). The subform would be linked to the main form by the Client field.

    See this post for an example of how to handle data entry for a many-to-many relationship with a main form and subform.[/quote]

    Thanks! I struggled with it for about 30 minutes yesterday before I had to do some 'real work', lol. Ran into problems hence my post yesterday. I'll follow what you have on that thread and consult my reference book (Access 2003 Bible). It's not a bad reference, but, like all references, it can't cover everything.

    I deeply appreciate all of your assistance!

  15. #15
    Star Lounger
    Join Date
    May 2003
    Location
    Whitmore Lake, MI , USA
    Posts
    84
    Thanks
    13
    Thanked 0 Times in 0 Posts
    I almost got there, I think...

    Got my form created, and created a query that gives me the combo box list and everything, but it saves to the Items table instead of results. I tried other query ideas, but I get the results listing in the subform's combo box, which does me no good.

    What step(s) did I goof up on on my query and/or subform? Frustrating to be this close and nto be able to solve the final riddle...
    Attached Files Attached Files

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
  •