Adding a folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a option to backup the data in the database. I give the user the
option to select their drive and folder, I'm using some code that was written
by Terry Kreft, this works just great but it doesn't give the user the option
to add a new folder if they want to. I know that in windows I've seen this
where they show a folder icon in the menu bar that allows user to add a
folder. Is there any way in Access that I can do this?
Thanks for any help.
 
Assuming you're talking about the code at
http://www.mvps.org/access/api/api0002.htm at "The Access Web, add the
following declaration at the top (put it after the declaration for
BIF_RETURNONLYFSDIRS)

Private Const BIF_NEWDIALOGSTYLE As Long = &H40

then change the line of code from

..ulFlags = BIF_RETURNONLYFSDIRS

to

..ulFlags = BIF_RETURNONLYFSDIRS Or BIF_NEWDIALOGSTYLE
 
Douglas
Thanks for the reply, that works just great. I do have another question,
when the window comes up it shows the opening with mycomputer and mynetwork
etc. is there any way to make this start with a particular folder?
 
Doug,
That works and I was able to fit it into my app. When I did this I lost the
ability to add a new folder, I've been looking for a place to put those lines
you mention earlier but don't know where they are to go. Is there a way to
have the new folder dialog box come up with this new code.
Thanks for all your help
 
In either BrowseForFolderByPath or BrowseForFolderByPIDL, you need to add
code to define ulFlags in the With BI ... End With construct.

Note that you'll have to provide values for both BIF_RETURNONLYFSDIRS and
BIF_NEWDIALOGSTYLE, as I don't think Stephen included their definitions in
the code.
 
Doug,

After a little trial and error figuring out where to put things I got it to
work. Thanks for all your help.
 
Back
Top