Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Select file dialog box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JR - 31 Jan 2006 15:41 GMT
I am using Ken Getz's API dialog box to allow users to select a file in my
application.  I am setting a starting directory and I need to make it so the
user can not change that directory.  Is there a way to do that?

Thanks in advance for any help.
Alex Dybenko - 31 Jan 2006 17:53 GMT
Try to add ahtOFN_NOCHANGEDIR  flag to  Flags argument
Signature

Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

>I am using Ken Getz's API dialog box to allow users to select a file in my
> application.  I am setting a starting directory and I need to make it so
> the
> user can not change that directory.  Is there a way to do that?
>
> Thanks in advance for any help.
JR - 31 Jan 2006 19:40 GMT
That is set by default.  The documentation about that flag is:  " don't
change directories when you're done"  whatever that's supposed to mean.

In any case that isn't what I'm looking for.  Thanks anyway.

> Try to add ahtOFN_NOCHANGEDIR  flag to  Flags argument
> >I am using Ken Getz's API dialog box to allow users to select a file in my
[quoted text clipped - 3 lines]
> >
> > Thanks in advance for any help.
Kevin K. Sullivan - 31 Jan 2006 20:04 GMT
I remember having the same problem.  I took a side way out: I changed
from using the API dialog box to just populating a listbox with the
specific directory's contents.  It's not as pretty, but it sure does
keep the user from browsing!

air code for Form_Load:

Dim strTemp as String
Dim strRowSource as String
Const cstrFolder = "C:\folder\"

strTemp = Dir(cstrFolder, "*.*") 'Change filter if desired.
Do Until strTemp = ""
    strRowSource = strRowSource & ";" & strTemp
    strTemp = Dir()
Loop

if Left(strRowSource, 1)  = ";" then
    strRowSource = Mid(strRowSource, 2)
end if

lstFiles.RowSource = strRowSource

HTH,

Kevin

> That is set by default.  The documentation about that flag is:  " don't
> change directories when you're done"  whatever that's supposed to mean.
[quoted text clipped - 9 lines]
>>>
>>>Thanks in advance for any help.
JR - 31 Jan 2006 21:52 GMT
Thanks Kevin that works great!

> I remember having the same problem.  I took a side way out: I changed
> from using the API dialog box to just populating a listbox with the
[quoted text clipped - 36 lines]
> >>>
> >>>Thanks in advance for any help.
Douglas J Steele - 31 Jan 2006 21:30 GMT
What it means is that the current directory won't be changed to whatever
directory you've navigated to.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> That is set by default.  The documentation about that flag is:  " don't
> change directories when you're done"  whatever that's supposed to mean.
[quoted text clipped - 8 lines]
> > >
> > > Thanks in advance for any help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.