By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,556 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,556 IT Pros & Developers. It's quick & easy.

Browse File Dialog Loses focus & goes under popup form.

P: n/a
I am using code from the following links to establish a
Browse File and Browse Folder dialog.

http://www.mvps.org/access/api/api0001.htm
http://www.mvps.org/access/api/api0002.htm

This code works great. However, once the file dialog becomes visible,
if the user clicks on my popup form that exists under the file dialog,
the file dialog disappears under the form. Then, when the form
clears, the file dialog shows. Select a file, and an error message
occurs.

How do I keep the Browse File Dialog on top of my popup dialog form?

Thanks
Greg

Apr 10 '07 #1
Share this Question
Share on Google+
3 Replies

P: n/a
On 10 Apr 2007 14:33:19 -0700, "Ap******@gmail.com"
<Ap******@gmail.comwrote:

Try setting the hwndOwner element to Me.hWnd of your popup form.

-Tom.
>I am using code from the following links to establish a
Browse File and Browse Folder dialog.

http://www.mvps.org/access/api/api0001.htm
http://www.mvps.org/access/api/api0002.htm

This code works great. However, once the file dialog becomes visible,
if the user clicks on my popup form that exists under the file dialog,
the file dialog disappears under the form. Then, when the form
clears, the file dialog shows. Select a file, and an error message
occurs.

How do I keep the Browse File Dialog on top of my popup dialog form?

Thanks
Greg
Apr 11 '07 #2

P: n/a
>
Try setting the hwndOwner element to Me.hWnd of your popup form.
Hello Tom

Is this what you are referring to? I added the hwnd line, but am
unsure about how to make the reference and assignment?
varFileName = ahtCommonFileOpenSave( _
OpenFile:=True, _
InitialDir:=varDirectory, _
Filter:=strFilter, _
Flags:=lngFlags, _
DialogTitle:=varTitleForDialog,_
hwnd:=Me.Form) '<-- my
code??? or Me.parent ???

Apr 11 '07 #3

P: n/a
I believe I got It! This seems to be working:

.hwndOwner = Screen.ActiveForm.hwnd

Thanks Tom

Greg

Apr 11 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.