Get it from CNET Download.com!
SC Add IN for Access


<April 2014>
SuMoTuWeThFrSa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Microsoft releases Visual Studio 2010
Microsoft launches Visual Studio 2010.  There are a lot of new features including new support for writing code to take advantage of parallel processors.  Microsoft offers a free version of its developer tools at

Offsite Backups
The news today has pictures of severe flooding in the northeast.  While hopeful that the damage is minimal, it is a reminder to plan for such tragedy.  The pictures show first floors of businesses underwater.  It is easy to think that a disaster will never hit your business but the odds are that at some point one will.  I have developed and maintained IT systems for 20 years and have had to use backups at least a dozen times.  That doesn't sound like a lot over a 20 years career but without those backups, my career wouldn't have been 20 years.

It's not enough to just backup your data, you must also think about where and how backups are stored.  A good backup policy should store data periodically offsite.  If flooding were to destroy your computers and your backups are sitting right next to the computer then you have a problem.  But if your backups are 10 miles away in a water and fireproof safe, then you still have to recover from your disaster but you now have the ability to do just that.

Your backup policy doesn't mean that you create a backup every night to be taken off-site but you should perform a backup on some interval such as weekly or monthly.  The importance of your data to your business and the effort to recreate should determine how often you perform a backup for offsite.

Faster networks also make it much easier to backup remotely but even with remote backups, it is still  a good idea to have a physical backup offsite in fireproof and waterproof location.
Profiler added to source control add-in for Access 2007
The Source Control add-in now has an easy to use code profiler included with it.  The profiler will keep track of the execution time for all subroutines and functions and then generate a report to help you optimize your VBA code.  The add-in is completely free.  Feel free to download it at

Access Basic Code to traverse a directory
I wrote a quick function that will recursively traverse a file system and store the files in Access database.  For the code to work, you need to create a table with an attachment name fileobj.


Sub test()
Dim c As New clsProfile
c.startFunction "test"
  traverseDir "C:\Course Technology\"
c.endFunction
Set c = Nothing
End Sub


Sub traverseDir(sPath As String)
Dim c As New clsProfile
c.startFunction "traverseDir"
  Dim sFile As String
  Dim db As Database
  Dim rs As Recordset
  Dim rsFile As Recordset2
  Dim filenames() As String
  Dim fileCount As Integer
  ReDim filenames(1)
  Dim i As Integer
  
  fileCount = 1
  Set db = CurrentDb
  Set rs = db.OpenRecordset("tblFiles")
  sFile = Dir(sPath & "*.*", vbDirectory)
  
  Do While Len(sFile) > 0
    filenames(fileCount) = sFile

    sFile = Dir()
    If sFile <> "" Then
     fileCount = fileCount + 1
     ReDim Preserve filenames(fileCount)
    End If
  Loop
  
  For i = 1 To fileCount
   sFile = filenames(i)
   If sFile <> "." And sFile <> ".." And UCase(Right(sFile, 4)) <> ".MDB" Then
    If (GetAttr(sPath & sFile) And vbDirectory) = vbDirectory Then
     traverseDir sPath & sFile & "\"
    Else
     rs.AddNew
     rs("FileName") = sFile
     rs("dir") = sPath
     Set rsFile = rs.Fields("FileObj").Value
     rsFile.AddNew
     rsFile.Fields("filedata").LoadFromFile sPath & sFile
     
     rsFile.Update
     rsFile.Close
     rs.Update
    End If
   End If
  Next
  
  rs.Close
  c.endFunction
  Set c = Nothing
End Sub
New Release of SC Add-In for Access 2007
There is a new release of the source control add-in for Access with 3 bug fixes.  Objects of different type can now have the same name.  Apostrophe can be used in an object name.  Report shows up as a type when viewing source control.  The Readme.txt has been updated.

2 3 4 5> >>|
Rss