Hi Guys, I am getting runtime error '3625' at the docmd.transfertext line . The error message says "The text file specification 'Campaign Import spec' doesn't exist. You can't import,export or link using the specification. "
The same code for my other project works perfectly fine.
The same code for my other project works perfectly fine.
Code:
Public Function ImportCampaignData(sFileName As String, sSpecName As String, CampaignId As Integer, sFileType As Long) As Boolean
' On Error Resume Next
' Excel Objects
Dim oExcelApp As Excel.Application
Dim oWorkSheet As Worksheet
Dim sExcelFileName As String
Dim rs As Recordset
Dim oFS As FileSystemObject
Dim sCustomersAdded As String
Dim sCustomersUdpated As String
Dim sLeadsAdded As String
Dim sErrorMessage As String
Dim db As Database
ImportCampaignData = False
Set db = CurrentDb
'Remove the previous import data just in case it exists
DoCmd.SetWarnings False
Forms("frm_LM_ImportLeads").lblProgress.Caption = "Deleting Campaign Import.."
Forms("frm_LM_ImportLeads").Repaint
ClearDataFromTable "tbl_LM_Import_Mas_Campaign"
Forms("frm_LM_ImportLeads").lblProgress.Caption = "Loading Campaign Import.."
Forms("frm_LM_ImportLeads").Repaint
' Import the data
' Err.Clear
DoCmd.TransferText acImportDelim, sSpecName, "tbl_LM_Import_Mas_Campaign", GFilePath & "\" & sFileName, False