Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    20

    Question Unanswered: Access error log location (Folder Reader/File Parser)

    Here is a simple question: Where on earth does Access 2000 keep its error logs on a 2000 Machine?

    I wrote a program in VB to read in all the files in a folder (all you do is give vb the path), then it creates a table with the name being the filename without the extension. The files in the folder are in pairs, nrage.fdf is the what the table structure should be (name text 3 would be on one line, etc) and nrage.txt contains the data ("bob").

    This all works but I am getting an inconsistent error when I try to run the module:

    MS Access Has generated errors....

    The thing is when I F8 ONCE and then press run I do not get this error. Never. But 90% of the time I hit run off the bat it kicks me out of access totally. I would like to see what the error log is saying.

    If you need to see the program let me know.

  2. #2
    Join Date
    Jul 2002
    Posts
    20
    Here is the program:

    Sub FileRetrieve()
    Dim objFSO
    Dim DBs As DAO.Database
    Dim Rs As DAO.Recordset
    Dim SQL As String
    Dim DeleteSQL As String

    'Set FileSystemObject to read folder contents
    Set objFSO = CreateObject("Scripting.FileSystemObject")

    'Set the Access Database & Clear Table
    Set DBs = OpenDatabase("F:\Data\MIS\WinsRecon\WinsRecon.mdb" )
    Set Rs = DBs.OpenRecordset("WinsFiles", dbOpenDynaset)
    DeleteSQL = "Delete * From WinsFiles"
    DBs.Execute (DeleteSQL)

    'Get the folder object associated with the directory
    Dim objFolder
    Set objFolder = objFSO.GetFolder("F:\Data\MIS\WinsRecon\WinsRecon_ Files")

    Debug.Print "--- The files found in " & objFolder.Name & " ---"

    'Loop through the Files collection
    Dim objFile
    For Each objFile In objFolder.Files
    Debug.Print objFile.Name
    Rs.AddNew
    Rs.Fields("Filename") = objFile.Name
    Rs.Update
    Next

    Debug.Print "----------- End Of Files ---------------"
    Debug.Print ""

    'Clean up!
    Set objFolder = Nothing
    Set objFile = Nothing
    Set objFSO = Nothing

    End Sub

    This one runs around 60% of the time off the first try. if I step thru once it runs 100% of the time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •