J
Jeff
Hi,
I have an Excel VBA program written where in part of the
Excel program it Imports an ASCII comma-delimated file
into a New Access Database into a New Table, then returns
back to Excel & does other things. This is working fine.
I will put the Code I am using for this.
However now what I would like to do is in addtion to the
above, if possible, is after the Access File is created &
the Table is created & the ASCII data is imported to be
able to Programatically convert it to Acceess 97 format &
save it in Access 97 format rather than it saving the
default of what I have which is Access 2000 OR if
possible to initally create it in Access 97 format have it
create & save it that way.
In general I know there is a way to do this manually by
opeing up the Access Database & selectint TOOLS / DATABASE
UTILITIES / CONVERT DATABASE / TO PRIOR ACCESS DATABASE
VERSION. But again what I would like to achive is to do
this Programatically.
Here is the Code I am currently using to do the above.
' Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.NewCurrentDatabase AccessFileName
' Gets Database object variable.
Set dbs = appAccess.CurrentDb
' Creates new table
Set tdf = dbs.CreateTableDef(TableName)
' imports ASCII file
appAccess.DoCmd.Transfertext acImportDelim, , TableName,
NewFile, True
Set appAccess = Nothing
Any help would be greatly appreciated.
Thanks,
Jeff
I have an Excel VBA program written where in part of the
Excel program it Imports an ASCII comma-delimated file
into a New Access Database into a New Table, then returns
back to Excel & does other things. This is working fine.
I will put the Code I am using for this.
However now what I would like to do is in addtion to the
above, if possible, is after the Access File is created &
the Table is created & the ASCII data is imported to be
able to Programatically convert it to Acceess 97 format &
save it in Access 97 format rather than it saving the
default of what I have which is Access 2000 OR if
possible to initally create it in Access 97 format have it
create & save it that way.
In general I know there is a way to do this manually by
opeing up the Access Database & selectint TOOLS / DATABASE
UTILITIES / CONVERT DATABASE / TO PRIOR ACCESS DATABASE
VERSION. But again what I would like to achive is to do
this Programatically.
Here is the Code I am currently using to do the above.
' Create new instance of Microsoft Access.
Set appAccess = CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.NewCurrentDatabase AccessFileName
' Gets Database object variable.
Set dbs = appAccess.CurrentDb
' Creates new table
Set tdf = dbs.CreateTableDef(TableName)
' imports ASCII file
appAccess.DoCmd.Transfertext acImportDelim, , TableName,
NewFile, True
Set appAccess = Nothing
Any help would be greatly appreciated.
Thanks,
Jeff