nick243243
New member
- Local time
- Today, 08:56
- Joined
- Oct 11, 2016
- Messages
- 8
I am using cmd transfer text file to import a notepad file. When I run the process that normally works with some errors. We have had two recent files that when imported causes access to become unresponsive half way through the import process. Is there a way to better handle this?
.
Thank You,
Nick
Code:
'** Step 1 -- Define where and what naming sequence the files are.
ChDir ("K:\Departments\Support Services\#System-Output\")
strfile = Dir("K:\Departments\Support Services\#System-Output\SPO152TICREQ*.TXT")
Do While Len(strfile) > 0
DoCmd.SetWarnings False
DoCmd.OpenQuery "ClearInitial"
DoCmd.TransferText acImportDelim, "SPO152TICREQImport Specification", "SPOTicImport", "K:\Departments\Support Services\#System-Output\" & strfile, False
On Error GoTo Err_ShopAtHome
FileCopy "K:\Departments\Support Services\#System-Output\" & strfile, "K:\Departments\Support Services\#System-Output\History\" & strfile
Kill "K:\Departments\Support Services\#System-Output\" & strfile
DoCmd.OpenQuery "CaptureTicReqs"
DoCmd.OpenQuery "Capture_PO_Color"
DoCmd.OpenQuery "PO_CountOf_Color"
DoCmd.OpenQuery "Update_CountOfColors"
strfile = Dir
Loop
DoCmd.SetWarnings False
DoCmd.OpenQuery "UpdateVendorName"
Forms![MainFrm]![MainSub].Requery
DoCmd.SetWarnings True
'Call VerifyImportErrorTables
Err_ShopAtHome:
End Function
Thank You,
Nick