Import text string

  • Thread starter Thread starter macamarr
  • Start date Start date
M

macamarr

Hello, I am attempting to import a text string that is 20
characters in lenght. Characters 1 through 6 are the
Account number,7 through 11 cases, 12 through 16 route
number and 17 through 20 are the stop number. My attempts
so far have been unsuccessful for what I am attempting.
I am trying to break the string into four separate
columns of a table. Is this possible to do without having
to go through Import Text Wizard and create the break
lines everytime I import?
 
do the import once, manually. set up your breaks in the wizard and set each
column's Field Name, Data Type, etc. next, click the Advanced button
(probably in lower left corner of the wizard dialog box) and click the Save
As button. name the specification something easy that makes sense to you,
and click OK, then click OK again in the Advanced box. go ahead and finish
the import to a new table, so your table is set up to match the
specifications you created.
now you can import automatically, using a macro or VBA code, and referencing
the Import Specification you just created and saved.

hth
 
Or, you could import the whole string into a temporary field and run an append query that breaks the string up using the mid$ command and place each piece into its own field.
 
Thanks! That works great.


-----Original Message-----
do the import once, manually. set up your breaks in the wizard and set each
column's Field Name, Data Type, etc. next, click the Advanced button
(probably in lower left corner of the wizard dialog box) and click the Save
As button. name the specification something easy that makes sense to you,
and click OK, then click OK again in the Advanced box. go ahead and finish
the import to a new table, so your table is set up to match the
specifications you created.
now you can import automatically, using a macro or VBA code, and referencing
the Import Specification you just created and saved.

hth





.
 
Back
Top