Results 1 to 3 of 3
  1. #1
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162

    DoCmd.OpenReport focus reverts back to form

    Hi guys,



    Im trying to get my report to open and become the main focus window. My current code
    Code:
    DoCmd.OpenReport "RePrintTimesheetReport", acViewPreview, , , acWindowNormal
    opens the report but then drops the focus back to the form, how do I get it to remain on the report?

    Thanks

  2. #2
    shabbaranks is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    162
    Got it... DoCmd.SelectObject acReport,

    And bingo was his nameo

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Thanks for posting back with your success and solution.

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

Similar Threads

  1. Replies: 7
    Last Post: 12-10-2018, 05:24 PM
  2. SET focus back to TEXTBOX if validation does NOT pass
    By taimysho0 in forum Programming
    Replies: 5
    Last Post: 12-04-2011, 10:10 PM
  3. Replies: 2
    Last Post: 10-13-2011, 09:14 AM
  4. DoCmd OpenReport ... where condition with a Like
    By Grooz13 in forum Programming
    Replies: 4
    Last Post: 08-31-2010, 09:04 AM
  5. Can docmd.openreport print X copies on Y printer?
    By Coolpapabell in forum Reports
    Replies: 1
    Last Post: 09-02-2009, 08:35 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