Selasa, 09 Mei 2017

Re: [MS_AccessPros] Creating Folders based on combobox

 

Dim strResult As String


    strResult = Dir("<full path expression here>")
    If Len(strResult) = 0 Then
        MsgBox "Path not found"
    End If

If you assemble the path you want to investigate in a string, then just pass the string variable to Dir without the quotes.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On May 9, 2017, at 10:27 PM, Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I know it probably takes a little more than that. How would I pass the path name into the function?

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Anyone who claimed that old age had brought them patience was either lying or senile."   







From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com> 
Sent: Tuesday, May 9, 2017 1:25 PM
Subject: Re: [MS_AccessPros] Creating Folders based on combobox

Art-

You could use the Dir function to find out if the folder exists and list the files in the folder.


And if the folder doesn't exist, use the MkDir statement to create it.



John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On May 9, 2017, at 8:03 PM, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I am searching for a way to create and open folders and display folder contents based on the selection from a combo box. I have a combo box called cboPriClass and when an item is selected then it populates a 2nd combobox called cboSubClass. What I need to do is either create a folder based on the last item selected or open the folder if it is already created. Any ideas?

Thank you

Art Lorenzini,
Sioux falls.








__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar