A
Andibevan
Hi All,
I have build the following simple function to import data into a table but
the data has a ' as the string delimiter. Is there any way I can specify
the string delimiter without using an interface spec?
I want to be able to distribute just the code on its own to keep it as
simple as possible for the users.
Thanks
Andi
Function fncBatchImport(strSRCpath As String, strTableName As String) As
Boolean
Dim strSRCdir As String, strSRCfile As String
'Reference the library Microsoft ActiveX Data Objects 2.1 (or higher).
On Local Error GoTo ImportError
'DoCmd.Hourglass True
DoCmd.TransferText acImportDelim, , strTableName, strSRCpath, True
ImportEnd:
'DoCmd.Hourglass False
fncBatchImport = tableExists(strTableName)
Exit Function
ImportError:
MsgBox Err.Description
' DoCmd.Hourglass False
End Function
I have build the following simple function to import data into a table but
the data has a ' as the string delimiter. Is there any way I can specify
the string delimiter without using an interface spec?
I want to be able to distribute just the code on its own to keep it as
simple as possible for the users.
Thanks
Andi
Function fncBatchImport(strSRCpath As String, strTableName As String) As
Boolean
Dim strSRCdir As String, strSRCfile As String
'Reference the library Microsoft ActiveX Data Objects 2.1 (or higher).
On Local Error GoTo ImportError
'DoCmd.Hourglass True
DoCmd.TransferText acImportDelim, , strTableName, strSRCpath, True
ImportEnd:
'DoCmd.Hourglass False
fncBatchImport = tableExists(strTableName)
Exit Function
ImportError:
MsgBox Err.Description
' DoCmd.Hourglass False
End Function