Results 1 to 2 of 2
  1. #1
    daveinuk is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    4

    Dialog windows and file requestor

    Hi,

    Hope someone can help.

    I have a main form which is opened from AutoExec after doing some pre-processing. The main form is opened using the dialog option so that I can close the background Access window, thus making the form look like an independent application window. All this works fine.



    However, on the form is a button which brings up the standard Microsoft file requestor, but when the file requestor is active I can hit the form button again and another file requestor pops up. The code on the form is waiting for the file requestor to return from the first requestor. When I close the file requestor it continues, but then when I close the second file requestor it continues again - as if there are two threads running.

    If the main form is opened in normal mode this doesn't happen.

    What I want to do is to be able to open the standard Microsoft file requestor in modal mode. I have worked around it by disabling the button on the first press until the requestor returns but other effects exist like loosing the file requestor if the main form is selected etc.

    I'm using the apiGetOpenFileName api function.

    Anybody got any thoughts?

    Many thanks
    Dave

  2. #2
    daveinuk is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    4
    Hi All,

    Ok I found the fix. The Hwnd (parent window
    handler) was set to Null so I changed it to the handler for the form window and
    now it works.

    Thanks
    Dave

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

Similar Threads

  1. Replies: 20
    Last Post: 10-28-2013, 06:26 PM
  2. Replies: 1
    Last Post: 08-02-2013, 09:37 AM
  3. Save As dialog box exporting Excel file
    By accessnewbie in forum Access
    Replies: 1
    Last Post: 03-09-2013, 03:15 PM
  4. Search for associated folders in file dialog box
    By john_billau in forum Programming
    Replies: 1
    Last Post: 01-27-2012, 03:48 PM
  5. How to get a load file dialog?
    By degras in forum Programming
    Replies: 4
    Last Post: 04-21-2011, 07:45 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