469,575 Members | 1,376 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Browse File Dialog Loses focus & goes under popup form.

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
3 4994
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
>
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
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.

Similar topics

1 post views Thread by Colin Graham | last post: by
3 posts views Thread by Gordan A Ziza | last post: by
3 posts views Thread by Highlander | last post: by
11 posts views Thread by Zytan | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.