Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / December 2005

Tip: Looking for answers? Try searching our database.

Create Macro to import fixed width text from clipboard or text file and update table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ghadley_00@yahoo.com - 30 Dec 2005 12:33 GMT
Hi,

I have a MS access database table for which I regularly need to import
fixed width text data. At present I have to to cut and paste the text
data from its source to a text file, save the file, import the text
file as fixed width text [it is not naturally delimited], and then run
an update query to copy the appropriate info into fields of a different
table.

Is it possible to write a macro to do all these steps? Also, is it
possible to import directly from the clipboard (to skip the step of
making a text file)?

Any help provided would be greatly appreciated.

Best wishes,

George Hadley
ghadley_00@yahoo.com
Steve Schapel - 30 Dec 2005 19:37 GMT
George,

As far as I know, it is not possible to import data into your database
from the clipboard.

However, the other 2 steps can certainly be done with a macro.  For
importing from the text file into your Access database, you would use a
TransferText action, and then use an OpenQuery action to move it into
the main table.  For the TransferText, you would run the process
"manually" first, via the File|Get External Data menu, and in the last
screen of the Import wizard, click the 'Advanced' button to save the
setup as an Import Specification.  THen nominate this in the
Specification Name argument of the TransferText action.

Signature

Steve Schapel, Microsoft Access MVP

> Hi,
>
[quoted text clipped - 15 lines]
> George Hadley
> ghadley_00@yahoo.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.