Hi All,
The following function working fine using RecordSet, its checking the files in the particular directory, If all the files found its fine , but If some file mising I call two functions GenerateEmail() and Wait(0 both functions are working fine
Problem?
How can I call the this function again? if all the files founds after wait function finishes, or when the global variale value sFNotFound <> -1 , because the variable value -1 its called two functions GenerateEmail and wait , want to run this function again after 10min
Do I have to use outer loo , or simply call this function again with the same function?
Many thanks
Many thanks
FArhan
The following function working fine using RecordSet, its checking the files in the particular directory, If all the files found its fine , but If some file mising I call two functions GenerateEmail() and Wait(0 both functions are working fine
Problem?
How can I call the this function again? if all the files founds after wait function finishes, or when the global variale value sFNotFound <> -1 , because the variable value -1 its called two functions GenerateEmail and wait , want to run this function again after 10min
Do I have to use outer loo , or simply call this function again with the same function?
Many thanks
Code:
Public Function NameofDataFiles()
Dim rs As DAO.Recordset
Dim varFileName As String
Dim varFilePath As String
'Dim strFNotFound As String
GetLogs ' This function need to call at starting when Patholgy Automation start (PICS)
LogUpdate "Start looking DATA files of Pathology Monthly Loads............."
Set rs = CurrentDb.OpenRecordset("SELECT filename,path from ImportFileNames order by id")
Do While Not rs.EOF
varFileName = rs.Fields("FileName")
varFilePath = rs.Fields("Path")
'Call Function to check the file exist in the folder or not.
Call TestFileExistence(varFileName, varFilePath) 'pass each FileName and path
rs.MoveNext
Loop
If sFNotFound = -1 Then
Call GenerateEmail
[COLOR=sandybrown] Wait 600 '600=10 minutes[/COLOR]
End If
rs.Close
End Function
FArhan
Last edited: