Results 1 to 7 of 7
  1. #1
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102

    Returning to record after viewing a report.

    I have a button that opens a report for viewing when I have a specific record open. When closing that report view I want to reopen the data input form to the record that I opened report for viewing. At this time I can view the report, but upon closing my data input form opens, but to the first record. Can anyone give me some code to reopen my data input form to the original record?



    Thank you in advance.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Why close the form?
    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
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102
    It seems that I need to close the form to view the report.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Is the form Popup property set to yes? If you really must use Popup, possible code options:

    1. code in the report Close event to open form filtered to recordID

    2. pass value back to form to use in code behind form that filters form or moves to desired record
    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
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102
    Yes it is a Pop Up.
    The report is based upon the Property that is being viewed in the main form, the property number is the Record Number in the table.
    After viewing the report and then closing it the main form reverts to the first record in the table.
    Do you have any code examples of your reconmendations?
    Thank you.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Behind report, code like:

    DoCmd.OpenForm "form name", , , "RecordNumber=" & Me.tbxRecordNumber

    Option 2 would be more complicated.

    Why must you use popup?
    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.

  7. #7
    Robert2150 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    102
    Thanks for the code, I will try it and let you know if it solves my problem.
    I use popup to completely fill screen when form opens. (without toolbars, or navigation bar).
    Thank You.

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

Similar Threads

  1. Help with Report viewing and printing
    By bscottj48 in forum Reports
    Replies: 2
    Last Post: 04-14-2015, 12:32 PM
  2. Viewing a Report
    By Robert2150 in forum Access
    Replies: 3
    Last Post: 03-02-2015, 07:42 PM
  3. Viewing a Report prior to printing.
    By Robert2150 in forum Reports
    Replies: 3
    Last Post: 10-26-2014, 10:27 AM
  4. Replies: 9
    Last Post: 01-20-2013, 10:27 PM
  5. Replies: 1
    Last Post: 08-10-2011, 06:28 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