Results 1 to 11 of 11
  1. #1
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42

    Placing a notes section in a report

    I would like to place a section on my report that allowsme write notes on a report before it is printed. I am trying to think of thebest way to go about doing this. I have been using a Label with a 2pt border;the problem with this is that it requires the user to go into layout view toadd notes.

    Does anybody have a solution to this dilemma that wouldn't require the user togo into layout view?



    Any and all suggestions will be greatly appreciated


  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    You could just add an unbound text box to the form where the report is opened and then add a text box to the report which reads from the textbox on the form.

  3. #3
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42
    This method does work. However it requires me to save the form in order for the text to show up on the report. I would prefer if the text showed in the report without saving.

    Is this possible?

  4. #4
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    No, you shouldn't have to save the form if you follow this method:

    WIth the form in design view: place a textbox on your form called TestBox then save and close.
    With the report in design view: place a textbox on your report and in the ControlSource for the textbox put =[Forms]![FormName]![TestBox] and then save and close.

    Now try entering some text into the form's textbox and then click the button to open the report.


    Note: you need to change 'FormName' to the actual name of your form.

  5. #5
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42
    This does work when I have the notes section on the form that calls the report. However, I would like the the notes to be controlled from a pop up form that is called on from the report. This way the user can review the report and then add notes that they see applicable before printing.

    When I try to use the pop up form it will not save or show the text that is put into the text box. Is there perhaps a VBA code that I could use that would solve my problem?

  6. #6
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    The only way that I can see this working is if you closed and then re-opend the report from the pop-up form with the notes box on.
    Something like this: have a button that says 'Save notes before printing' or something and then when clicked it closes the report and opens it again (the users won't see this happening if you turn screen repaint off and on) but the notes will now appear on the report.

  7. #7
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42
    I knew it was a stretch to get this kind of thing to work. I take your advice and give it a shot.

    Thanks for the help!

  8. #8
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    You can use an Inputbox also. Place a text box in the report say txtNotes and set its controlsource to =GetNotes()
    Put this code in the report

    Code:
    Function GetNotes()
    GetNotes=InputBox("Enter the notes for  the report " & vbNewLine & "For Ex. This are report notes", "Enter notes")
    End Function

  9. #9
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42
    Amrut, the code works nearly perfectly, Thnak you. How would I have the code be called by a button click?

  10. #10
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42
    I ask this because when I use the code the input box constantly pops up. I would like to have it so that the input box only pops up if you click a button.

  11. #11
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    To use it on button click, set the control source of report's text box to Form!YourFormName!yourTextBoxName where yourTextBoxName is a text box on the form. Enter the notes in the text box and then open the report using the command button.

    There are other ways also to accomplish the above.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Adding a report section for a subreport
    By bdicarlo1 in forum Reports
    Replies: 1
    Last Post: 11-15-2012, 04:15 PM
  2. Replies: 3
    Last Post: 10-30-2012, 12:28 PM
  3. Count in detail section of a report
    By ccordner in forum Reports
    Replies: 9
    Last Post: 02-08-2012, 06:55 AM
  4. Adding notes to a report
    By swat in forum Reports
    Replies: 3
    Last Post: 10-03-2011, 04:13 PM
  5. The length of detail section of a report
    By blueraincoat in forum Reports
    Replies: 2
    Last Post: 04-06-2011, 12:24 AM

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