Load Statistics

ZMAN2

Registered User.
Local time
Today, 00:22
Joined
May 6, 2003
Messages
37
If I automatically load a table daily, is there a way to create or maintain a table of the load statistics? For example:

Date-----------File----------------------Records
9/5/2005----No File Found------------------0
9/6/2005----c:\winnt\temp\file1.xls--------100

Thanks in advance :)
 
ZMAN2.

You can do something like the following:


Code:
Public Function ProcessDataInput(strFileName As String) As Boolean
Dim lngStartingRecordCount As Long
Dim lngEndingRecordCount   As Long

lngStartingRecordCount = Nz(DCount("[SomeField]", "YourTable"), 0)
'
' Do the import using the file spec passed in
'
'     *** Your import logic here ***
' 
lngEndingRecordCount = Nz(DCount("[SomeField]", "YourTable"), 0) - lngStartingRecordCount
'
' Log the import specs:
'
Docmd.RunSQL "Insert Into YourLogFile (TheDate, TheFile, HowManyRecords) " & _
             "Values (#" & Date & "#. '" & strFileName & "', " & lngEndingRecordCount & ")"


End Function

Wayne
 
Thanks

That works for me. I appreciate everyone's input.
 

Users who are viewing this thread

Back
Top Bottom