Function TransferTextTest()
Dim strPathName As String
strPathName = "\\server2\IT\Databases\XPN\from_xpn\C01398P01NTC" & Format(Date - 1, "mmddyy") & ".TXT"
'Dir returns zero length string if file not found:
If Len (Dir (strPathName) & "") = 0 Then
MsgBox "File not found"
Else
DoCmd.TransferText acImportDelim, "xpn trigger import spec", "TRIGGER_IMPORT_MASTER", strPathName , False
End If
End Function
|