Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA To Control Access

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Access Jay Excel Discussion (Misc queries) 3 October 29th 08 09:21 PM
Excel spin box - no Control tab in Format Control dialong box tocoau Excel Worksheet Functions 7 August 10th 08 03:15 PM
Configuring Excel 2003 to control access to Trusted Publishers [email protected] Excel Discussion (Misc queries) 0 July 10th 06 09:04 AM
In EXCEL,How do you control the access to SHEET2, based on a value Vikranth Excel Worksheet Functions 0 March 16th 05 12:13 PM
Accessing ActiveX Controls using VBA - can't use Control.Name to access. Rob Bovey Excel Programming 2 July 30th 03 09:11 AM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"