Importing text files into a table

Caroline001

New member
Local time
Today, 17:12
Joined
Jun 6, 2008
Messages
1
Hi there,
I am using Microsoft 2003 and Vista.
I am trying to import a Text file and create a table and the only formats I have available to me are:
Microsoft Office Access
Windows Sharepoint Services
XML
ODBC Databases

Is there a patch or a setting which will enable me to see the normal full list of file types?
:confused:
 
hi, im noob but i find this:

Code:
http://www.databasedev.co.uk/text-import-macro.html
I try i to automatize using this code
Code:
Function ImportTxt()
'Created by Helen Feddema 08-23-2001
'Last modified by Thomas 04-28-2008

If gblnErrorTrapping = True Then On Error GoTo ErrorHandler
On Error Resume Next

   'Warning Off
   DoCmd.SetWarnings False
   
   'Delete old tbl (from previous import session)
   DoCmd.DeleteObject ObjectType:=acTable, _
      objectname:="tblImportRaw"
   
   Dim strFilePath As String
   Dim strFullDBName As String
   Dim strDBName As String
   Dim strFullPath() As String
   Dim intUBound As Integer
   Dim dbs As DAO.Database
   Dim strFileName As String
   
   'Returns path to database
   Set dbs = CurrentDb
   strFullDBName = dbs.Name
   strFullPath = Split(strFullDBName, "\", -1, vbTextCompare)
   intUBound = UBound(strFullPath)
   strDBName = strFullPath(intUBound)
   strFilePath = Mid(dbs.Name, 1, Len(dbs.Name) - Len(strDBName))
   Debug.Print "Path: " & strFilePath
   strFileName = strFilePath & "import.txt"
   
   'Imports information from file import.txt, which lies in the same directory   as db into tblimportRaw
   DoCmd.TransferText transfertype:=acImportFixed, _
   specificationname:="import_t", _
   TableName:="tblImportRaw", FileName:=strFileName, _
   hasfieldnames:=False
   
ErrorHandlerExit:




   Exit Function

ErrorHandler:
   MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
   Resume ErrorHandlerExit

End Function
You have to specified "specification file" before run this code


Code:
http://support.microsoft.com/kb/208991
http://www.btabdevelopment.com/main/QuickTutorials/A2K7HowtoCreateanImportSpecification/tabid/99/Default.aspx
try to search
Code:
http://www.helenfeddema.com/
for more.
 
Last edited:
reinstall access, selecting all the drivers etc

its in there somewhere

you should have text, csv, excel etc etc
 

Users who are viewing this thread

Back
Top Bottom