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 / General 1 / June 2006

Tip: Looking for answers? Try searching our database.

Programatically create a file folder

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
The Woo - 03 Jun 2006 08:49 GMT
Can one programatically create a file folder which has the same name
as a key field, using a command button?

Or,

Can there be a a command button which opens up a directory tree to a
specified location. I'm thinking this is a visual basic-related
question?

Why? I have a client tracking database. When the client's record is
opened before me on my form, wouldn't it be great to click a button
and then be able to drag items such as custom-made letters or mp3
dictation recordings to a folder unique to that specific client? It's
true, doing it manually takes but a few seconds, but if your software
is full of time-savers like this, it can turn out to be a real
productivity-booster.

Now, I feel cheap asking someone else to figure this out for me, but
it's such a great idea that maybe whoever answers this question will
be able to use this idea too. I lack coding experience, but I have
terrific ideas for Access and productivity (listening Microsoft?).

Thank you all for putting up with me!
John Mishefske - 03 Jun 2006 08:54 GMT
> Can one programatically create a file folder which has the same name
> as a key field, using a command button?
[quoted text clipped - 17 lines]
> be able to use this idea too. I lack coding experience, but I have
> terrific ideas for Access and productivity (listening Microsoft?).

Yes. Use the "MkDir" command perhaps as so:

Function CreateDirIfRequired(strMyPath As String)
    If Len(Dir(strMyPath, vbDirectory)) = 0 Then
        MkDir strMyPath
    End If
End Function

Signature

'---------------
'John Mishefske
'---------------

Allen Browne - 03 Jun 2006 08:54 GMT
If you create a Hyperlink field in your table, you can link to any document
you wish. For more info, see:
   Introduction to Hyperlink fields
at:
   http://allenbrowne.com/casu-09.html

You can use FollowHyperlink in VBA to open the folder. For example, if you
have a folder named:
   C:\Data\Clients\1001
where 1001 is the client number, you can use:
   Dim strFolder As String
   strFolder  =  "C:\Data\Clients\" & [ClientNumber]
   FollowHyperlink strFolder

In Access 2007, you will be able to create an Attachments field, and attach
as many files as you wish to a client record.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Can one programatically create a file folder which has the same name
> as a key field, using a command button?
[quoted text clipped - 19 lines]
>
> Thank you all for putting up with me!
The Woo - 04 Jun 2006 10:10 GMT
Sheer genius. People such as you move technology forward as much and
perhaps moreso than the creators of the original software. I thank
you.
 
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.