Results 1 to 2 of 2
  1. #1
    mcernik is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2014
    Posts
    3

    Cool parent form losing focus on print previews from child forms

    Having a tough time solving this issue with my forms. It looks like I'm losing focus control on the forms due to the Modal settings, but I'm at a loss on how to fix this. Sorry if the explanation is a bit long winded, but its the best way I can give the most detail to describe what's happening. ALL the forms I use here are in Modal mode.



    My DB opens to a main form - much like a switchboard form: This is the 'Parent' form. Selecting a button opens another form in modal mode (no one can leave this form unless you chose an option to do so): This is a 'Child' form. One of the options the child form has is a print preview option. If I use this print preview and close it, it correctly returns control to the Child form. In fact, I can open another form from this child form (Call this a grandchild form if you want), close it and still have proper control in the child form. Problem comes in when I close this child form to go back to the parent form - I no longer have any focus on anything in the db. IOW, I have to close the database since I cant do anything else with it.

    This is the same issue in the grandchild (GC) form. If I open print preview in the GC form, close it and return back to the GC form, I'll still have control over items in the GC form. but when I close the GC form to go back to the Child form, Same deal - no longer have any focus on anything in the DB when I try to return to the previous form. All my form transitions from one to another work great until I use these printing functions. Once I use the printing features, I lose the parent links of that form. How do fix something like this?

    I had called on my print previews with macros at first, then switched over to using vba commands (DoCmd.RunCommand acCmdPrintPreview). I tried adding requery & setfocus controls of the calling form when closing a form, none of these are helping me get back the focus to the calling form. I figured the modal feature is disabling the calling form when opening another form, but there are no enable/disable controls for forms.

    Can anyone offer a simple solution to this? (I saw some forums talking about using tab controls and their explanations were anything but simple) Thanks - MC

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Are you not able to click on the Parent form to regain focus?

    Is code execution disrupted by the loss of focus?

    Did you test with forms not Modal? Does the issue persist?
    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.

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

Similar Threads

  1. An unusual(?) parent-child form
    By bnorton in forum Access
    Replies: 10
    Last Post: 08-19-2014, 04:55 PM
  2. Replies: 3
    Last Post: 07-03-2013, 01:20 PM
  3. Passing value from parent to child form
    By Pragmatic in forum Forms
    Replies: 1
    Last Post: 12-02-2011, 07:23 PM
  4. Replies: 2
    Last Post: 09-16-2011, 06:11 PM
  5. Problem using Parent/Child Form/Subform
    By EvanRosenlieb in forum Forms
    Replies: 4
    Last Post: 06-27-2011, 05:25 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