Directory tree


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Directory tree

  1. #1
    Join Date
    Dec 2007
    Posts
    110

    Directory tree

    In my MS Access 2003 database I want to have the option to select a folder where the backup of the backend is stored before the database closes. Can one of you give me directions on the internet where I can find the code that gives me the directory tree.

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    How about the Common Dialog Control?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  4. #4
    Join Date
    Dec 2007
    Posts
    110

    Question

    Thanks. Got it working and able to store the path in the backend. Before the backend is stored I'm checking if a path is set. If not then I use the defauld path. Doing this I get a response from Access 2003 "invalid use of null" in the red line of the underneath code.

    Code:
    Dim strBackupFolder As String
    Set db = CurrentDb
    Set rs = db.OpenRecordset("Administratiesysteem")
    strBackupFolder = rs("BackupFolder").Value
    'In the situation that in main menu Onderhoud the folder for backups is not selected
    If Len(strBackupFolder) = 0 Then
    strBackupFolder = "C:\Aalles Administratiesysteem\Aalles Administratiesysteem Backups\"
    End If

  5. #5
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Ah yes, been there - got that. Try this
    Code:
    If Not IsNull(rs("BackupFolder").Value) Then
    You could add an Else (although I seldom do in my code) that pops up a message box indicating there is no value in the backupfolder field.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  6. #6
    Join Date
    Dec 2007
    Posts
    110
    Thanks again for your help Hack! It is solved now. ""...Null...Empty.....very confusing

  7. #7
    Join Date
    Feb 2008
    Posts
    162
    Quote Originally Posted by Vulcan1500
    ""...Null...Empty.....very confusing
    Exactly. One way to simplify is to set AllowEmptyStrings to False for Text columns in Access tables. That way, you only have to check for nulls. For example, you won't find null records if you use WHERE col = "". And you won't find empty strings if you use WHERE IsNull(col). You can use implicit conversion to force Access to cast nulls to strings by doing WHERE (col & "") = "" but then you always have to remember to do that, which gets to be a pain.
    It's not what you don't know that gets you in trouble. It's what you know that just ain't so. -Mark Twain

  8. #8
    Join Date
    Dec 2007
    Posts
    110
    Never done that Slope. I will look into this to simplify. Thanks for advice!

Similar Threads

  1. Tree Nodes
    By thealley in forum Java
    Replies: 5
    Last Post: 03-23-2008, 08:31 PM
  2. accessing LINUX directory tree using C++
    By eshwar_gunner99 in forum C++
    Replies: 1
    Last Post: 03-10-2007, 08:04 PM
  3. Changing targets in XML Tree
    By jdnyc in forum XML
    Replies: 0
    Last Post: 11-07-2005, 03:48 AM
  4. Directory tree
    By Keith in forum ASP.NET
    Replies: 1
    Last Post: 09-04-2002, 01:16 PM
  5. Recursive Directory Search ?
    By Bob in forum .NET
    Replies: 1
    Last Post: 12-14-2001, 03:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center