Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11

    Inserting a formset with subforms into a report

    Dear Community,



    My main form with all subforms work well "online" in form view. Some fields are calculated (also recalculated after changes of certain fields in the main
    form).

    Since I'm happy with the design and math in my formset, I came up with the (brilliant?) idea to simply insert all the set into a blank report. I
    thought to myself, why do the design and math job twice?

    The initiative was entirely on trial-and-errror basis, and I did not know that this is really supposed to work out! AND it works, but NONE of the CACULATED numeric fields shows up with results. I'm not sure of the English translationen here, but faults like #Name and #Wrong(?) replace the correct numbers of the "online" form, despite the relationships between fields, subforms and mainform have been established and are working while scrolling back and forth through in the form view.

    I would highly appreciate any guidance here! I missed something, but what?

    Best regards,

    Henrik

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Never done this. Do you want to provide the project for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Form view.pdfReport (all forms inserted into the report).pdf
    Quote Originally Posted by June7 View Post
    Never done this. Do you want to provide the project for analysis?
    Thank you for your time June7!

    I'm not sure that I explained my problem clear enough, so I attach two snipped pics - the form view, as well as the report.

    Again, thank you very much!

    Best regards,

    Henrik

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    I understood the issue and yes, I can see the error notices but doesn't really enable me to figure out how to fix. Obviously Access can't interpret some reference in the textbox. What specifically that is I can't know. So unless you want to provide the project for analysis, I can't help.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by June7 View Post
    I understood the issue and yes, I can see the error notices but doesn't really enable me to figure out how to fix. Obviously Access can't interpret some reference in the textbox. What specifically that is I can't know. So unless you want to provide the project for analysis, I can't help.
    Certainly friend, but how can I provide this (classified as "Novice" in this forum and "Newbie" when it comes to MS Access)?

  6. #6
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    ....By uploading all the database, or?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Can attach file to post. Attachment Manager is below the Advanced post editor. Make copy, remove confidential data, run Compact & Repair, zip if still large. Up to 2mb zip allowed.

    Or upload to fileshare site such as Box.com and post link to the file.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Byahusets Vanner.zip
    Quote Originally Posted by June7 View Post
    Can attach file to post. Attachment Manager is below the Advanced post editor. Make copy, remove confidential data, run Compact & Repair, zip if still large. Up to 2mb zip allowed.

    Or upload to fileshare site such as Box.com and post link to the file.
    Again, thank you!

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Problem is calcs in the form used as subreport refer to the main form, such as: =[Forms]![Kunder]![Lokaler Underformulär].[Form]![S:a LOA hel]

    As long as the form Kunder is open when report runs, the calcs will work. Alternatives:

    1. somehow get all the calcs accomplished in a query that is used as the RecordSource for the form, doesn't look like would be easy because the formulas reference data from other subforms/subreports

    2. build reports, copy/paste the controls from the form to report and modify calcs to change [Form]![Kunder] to [Report]![Kunder]
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #10
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11

    Thumbs up

    Quote Originally Posted by June7 View Post
    Problem is calcs in the form used as subreport refer to the main form, such as: =[Forms]![Kunder]![Lokaler Underformulär].[Form]![S:a LOA hel]

    As long as the form Kunder is open when report runs, the calcs will work. Alternatives:

    1. somehow get all the calcs accomplished in a query that is used as the RecordSource for the form, doesn't look like would be easy because the formulas reference data from other subforms/subreports

    2. build reports, copy/paste the controls from the form to report and modify calcs to change [Form]![Kunder] to [Report]![Kunder]

    I, April10, salute June7!

    To let the form stay open while printing the report is the solution and a thing not too hard to remember.

    The idea of forums in general is great but not fair, not at all! The experts always seem to devote time to give,and the rest of us gratefully take, bowing. I'm just wondering when the time comes to me and all other "takers", if ever?

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Something about this was still troubling me, so took another look at the report. Yes, when the form is left open the errors go away but calcs are not correct for each record of the report. Because the formulas can reference only the current record of the form and subforms, the results on the report are the same on each record. You really need to go with option 2.

    Also, the report is too wide for SizeA paper.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by June7 View Post
    Something about this was still troubling me, so took another look at the report. Yes, when the form is left open the errors go away but calcs are not correct for each record of the report. Because the formulas can reference only the current record of the form and subforms, the results on the report are the same on each record. You really need to go with option 2.

    Also, the report is too wide for SizeA paper.

    Yes friend, I already realised and have been trying this, however not yet successfully. Subforms are now replaced by subreports [it's a pitty that I cannot choose "data table"/"data sheet" (don't know the correct translation here) in the subreport in comparison with wider options in a form!]. BUT, despite your good instructions, I still face the #xyz? issues

  13. #13
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Don't follow what is #xyz? issues? What is the difficulty encountered with creating subreports?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #14
    Henrik is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2012
    Posts
    11
    Quote Originally Posted by June7 View Post
    Don't follow what is #xyz? issues? What is the difficulty encountered with creating subreports?
    Sorry to take up your time again: You know, those #Name? and #Wrong? (#Fault?) are still the same.

  15. #15
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    You built subreports and modified the formulas? Like:

    =[Reports]![Kunder]![Lokaler Underformulär].[Report]![S:a LOA hel]

    Provide the revised project if you still need help.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 02-28-2011, 09:46 AM
  2. Inserting Picture in a report
    By dada in forum Reports
    Replies: 1
    Last Post: 09-17-2010, 01:38 PM
  3. Inserting into a database
    By Cined in forum Programming
    Replies: 1
    Last Post: 04-14-2010, 12:33 PM
  4. Inserting a Report into a Form
    By James3mc in forum Forms
    Replies: 2
    Last Post: 11-18-2009, 08:27 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