473,320 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Application Focus Lost when returning from Access Modal Dialog

Anyone seen this before?
Symptom:
Win10 64-bit Access 2016 DeskTop application and caller form LOSES FOCUS after (opening and closing a Modal Dialog form).

When Occurs:
Upon closing the Modal Dialog, Focus switches from the Access Application to the Win10 File-Explorer or Calculator (whatever happens to be open in windows at the time) as if Alt-Tab was used to switch windows.

Details:
The Modal Dialog performs data entry and a DAO back-End table update before being closed by user action (Button) and attempting to return to the calling form.
Dialog Call and return logic is in a form sub procedure:
DoCmd.OpenForm FormName:="frmItemSaleDetMain", _
WindowMode:=acDialog, _
WhereCondition:=BuildCriteria
(Field:=strField, FieldType:=dbText,
Expression:="TempVars!CurrentSaleDetID"), _
OpenArgs:=ItemDescription & "," & ItemDescription2

'MsgBox "Returned "
Me!QtyShipped = Nz(TempVars!CurrentQtyShipped, 0)
DoCmd.GoToControl "QtyShipped"
Me!QtyShipped.SetFocus

Control is returned from the dialog via :
DoCmd.Close ObjectType:=acForm, ObjectName:=Me.Name

Help!
Is this caused by some kind of database table contention?
Oct 20 '16 #1

✓ answered by molsen47

I could discover no cause.
Solution was to recreate the modal dialog, then cut and pasted the vba code from the broken dialog. Hours lost, but this resolved the Access Application loss of Focus issue.

BTW, Also failed using Access to create the replacement form from the broken [Selecting form in the Nav Pane then Menu Create->Form] ; the problem persisted with the replacement form created by Access.

1 866
I could discover no cause.
Solution was to recreate the modal dialog, then cut and pasted the vba code from the broken dialog. Hours lost, but this resolved the Access Application loss of Focus issue.

BTW, Also failed using Access to create the replacement form from the broken [Selecting form in the Nav Pane then Menu Create->Form] ; the problem persisted with the replacement form created by Access.
Oct 21 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
0
by: =?Utf-8?B?Qw==?= | last post by:
Hi, I have a series of textboxes on an aspx page. These textboxes are within an UpdatePanel. On the OnTextChanged Event of each textbox I do some calculations in my codebehind and update...
0
by: dattaforit | last post by:
Hello Friends, I am using VC++ 2005. I have an application for C#. In this application i want to display a modal dialog box or a modal form in a thread. I have on thread running and in that...
0
by: =?Utf-8?B?a20=?= | last post by:
I've got a simple C# app built in VS2005. When I click a menu item a modal form opens and performs a lengthy operation in the Load event handler to populate a text control, so it takes a few...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
4
by: Steve | last post by:
Hi guys, You know how annoying it is when Visual Studio keeps asking you for a username and password to access TFS? I figured it would be easy to write a little System Tray utility that could...
4
by: shripad4703 | last post by:
If I anm typeing text in textbox in any page of WPF, and toaster pop up apprears then that takes whole focus and my cusrsor loses focus. Will you please help to not to offer any focus to toaster? I...
3
by: gearryg | last post by:
We use an Acess Database as a menu of Access Databases. It worked fine until we switched to Office 2007 from 2003. Code is below: Private Sub DisclosureQAOPen_Click() On Error GoTo...
0
by: MattyWebber | last post by:
I've narrowed it down to what I think is the cause although I'm not too sure of a solution. Here is my code: public void WriteSaleListToFile(SaleList saleList, String filePath) { ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.