Dirtrider929
Registered User.
- Local time
- Today, 11:59
- Joined
- Nov 12, 2013
- Messages
- 32
I have a program that builds a text file from a query and places it on the network for download. There are other users who have a different application that when a button is pressed they pull in the text file and it automatically imports the txt file into a table.
Well overnight this process does not work anymore. I have concluded, IMO, that the problem exists with how the text files are compiled now. Does anyone know of any changes that could be affecting the process?
Here is the code to build the txt files:
If fs.FileExists(strAppInfoNetworkDBLocation + "CSM Download Items\SWSItems.txt") Then
Kill (strAppInfoNetworkDBLocation + "CSM Download Items\SWSItems.txt")
End If
If fs.FileExists(strAppInfoNetworkDBLocation + "CSM Download Items\ChainItems.txt") Then
Kill (strAppInfoNetworkDBLocation + "CSM Download Items\ChainItems.txt")
End If
Me.lblSaleRep.Caption = "Exporting SWS Items ..."
Me.lblProgress.Caption = ""
Me.Repaint
DoCmd.TransferText acExportDelim, , "qryBuildSWSItemsTxt", strAppInfoNetworkDBLocation + "CSM Download Items\" + "SWSItems.txt", True
Me.lblSaleRep.Caption = "Exporting Chain Items ..."
Me.Repaint
DoCmd.TransferText acExportDelim, , "qryBuildChainItemsTxt", strAppInfoNetworkDBLocation + "CSM Download Items\" + "ChainItems.txt", True
Set fs = Nothing
DoCmd.SetWarnings True
Me.lblSaleRep.Caption = "Process complete!"
Me.Repaint
And here is the code for the import:
Set dbExecute = CurrentDb()
On Error GoTo ErrImports:
If strSWSItems = "Yes" Then
Me.lblSyncProgress.Caption = "Importing new SWS Items"
Me.Repaint
dbExecute.Execute "Delete * from tblSWSItems"
dbExecute.Close
DoCmd.TransferText acImportDelim, , "tblSWSItems", CurrentProject.Path + "\CSMData\SWSItems.txt", True
End If
Set dbExecute = CurrentDb()
If strChainItems = "Yes" Then
Me.lblSyncProgress.Caption = "Importing new Chain Items"
Me.Repaint
dbExecute.Execute "Delete * from tblChainItems"
dbExecute.Close
DoCmd.TransferText acImportDelim, , "tblChainItems", CurrentProject.Path + "\CSMData\ChainItems.txt", True
End If
fnRefreshTableLinks
Well overnight this process does not work anymore. I have concluded, IMO, that the problem exists with how the text files are compiled now. Does anyone know of any changes that could be affecting the process?
Here is the code to build the txt files:
If fs.FileExists(strAppInfoNetworkDBLocation + "CSM Download Items\SWSItems.txt") Then
Kill (strAppInfoNetworkDBLocation + "CSM Download Items\SWSItems.txt")
End If
If fs.FileExists(strAppInfoNetworkDBLocation + "CSM Download Items\ChainItems.txt") Then
Kill (strAppInfoNetworkDBLocation + "CSM Download Items\ChainItems.txt")
End If
Me.lblSaleRep.Caption = "Exporting SWS Items ..."
Me.lblProgress.Caption = ""
Me.Repaint
DoCmd.TransferText acExportDelim, , "qryBuildSWSItemsTxt", strAppInfoNetworkDBLocation + "CSM Download Items\" + "SWSItems.txt", True
Me.lblSaleRep.Caption = "Exporting Chain Items ..."
Me.Repaint
DoCmd.TransferText acExportDelim, , "qryBuildChainItemsTxt", strAppInfoNetworkDBLocation + "CSM Download Items\" + "ChainItems.txt", True
Set fs = Nothing
DoCmd.SetWarnings True
Me.lblSaleRep.Caption = "Process complete!"
Me.Repaint
And here is the code for the import:
Set dbExecute = CurrentDb()
On Error GoTo ErrImports:
If strSWSItems = "Yes" Then
Me.lblSyncProgress.Caption = "Importing new SWS Items"
Me.Repaint
dbExecute.Execute "Delete * from tblSWSItems"
dbExecute.Close
DoCmd.TransferText acImportDelim, , "tblSWSItems", CurrentProject.Path + "\CSMData\SWSItems.txt", True
End If
Set dbExecute = CurrentDb()
If strChainItems = "Yes" Then
Me.lblSyncProgress.Caption = "Importing new Chain Items"
Me.Repaint
dbExecute.Execute "Delete * from tblChainItems"
dbExecute.Close
DoCmd.TransferText acImportDelim, , "tblChainItems", CurrentProject.Path + "\CSMData\ChainItems.txt", True
End If
fnRefreshTableLinks