PC Review


Reply
Thread Tools Rate Thread

Convert text into tables

 
 
Lafeyette
Guest
Posts: n/a
 
      18th Jun 2009
A memo field in my table contains a list of products, with one product
occupying a row in the field (not an observation in the table). Now I want to
remodel this table so that one product actually becomes an observation. In
other words, I need to converts the text in the memo field into tables, using
the paragraph mark as the delimiter. Below illustrates the issue:

Original table
The desired table
Supplier Product List (memo) Supplier Product
List (text)
---------- ------------------------- ----------
-------------------------
A Product 1 A
Product 1
Product 2 ----------
-------------------------
---------- ------------------------- A
Product 2
B Product 3 ----------
-------------------------
Product 4 B
Product 3
---------- ------------------------- ----------
-------------------------
… …

Is that doable? Many thanks.

Lafayett

 
Reply With Quote
 
 
 
 
Lafeyette
Guest
Posts: n/a
 
      18th Jun 2009
Sorry, the example didn't display properly in the main entry. Here is another
try:

Original table
Supplier Product List (memo)
---------- -------------------------
A Product 1
Product 2
---------- -------------------------
B Product 3
Product 4

---------- -------------------------
…

The desired table
Supplier Product List (text)
---------- -------------------------
A Product 1
---------- -------------------------
A Product 2
---------- -------------------------
B Product 3
---------- -------------------------
…

Look forward to your suggestion. Thanks a lot.

Lafayette


"Lafeyette" wrote:

> A memo field in my table contains a list of products, with one product
> occupying a row in the field (not an observation in the table). Now I want to
> remodel this table so that one product actually becomes an observation. In
> other words, I need to converts the text in the memo field into tables, using
> the paragraph mark as the delimiter. Below illustrates the issue:
>
> Original table
> The desired table
> Supplier Product List (memo) Supplier Product
> List (text)
> ---------- ------------------------- ----------
> -------------------------
> A Product 1 A
> Product 1
> Product 2 ----------
> -------------------------
> ---------- ------------------------- A
> Product 2
> B Product 3 ----------
> -------------------------
> Product 4 B
> Product 3
> ---------- ------------------------- ----------
> -------------------------
> … …
>
> Is that doable? Many thanks.
>
> Lafayett
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      19th Jun 2009
On Thu, 18 Jun 2009 09:48:01 -0700, Lafeyette
<(E-Mail Removed)> wrote:

>Sorry, the example didn't display properly in the main entry. Here is another
>try:
>
> Original table
>Supplier Product List (memo)
>---------- -------------------------
>A Product 1
> Product 2
>---------- -------------------------
>B Product 3
> Product 4
>
>---------- -------------------------
>…
>
> The desired table
>Supplier Product List (text)
>---------- -------------------------
>A Product 1
>---------- -------------------------
>A Product 2
>---------- -------------------------
>B Product 3
>---------- -------------------------
>…
>
>Look forward to your suggestion. Thanks a lot.


That's going to require some VBA code to parse through the text, looking for
vbCrLf (new line) delimiters, and parsing each row into fields: i.e. nothing
automatic and probably not trivial. I wonder if a "cheat" might work - you
could copy and paste the entire memo field into an Excel spreadsheet, clean up
the separator hyphens, and extract the rows and columns back into Access.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Lafeyette
Guest
Posts: n/a
 
      19th Jun 2009
Thanks for the answer. Confirm my bad feeling, though. Going to be a labor
intensive work :-(

"John W. Vinson" wrote:

> On Thu, 18 Jun 2009 09:48:01 -0700, Lafeyette
> <(E-Mail Removed)> wrote:
>
> >Sorry, the example didn't display properly in the main entry. Here is another
> >try:
> >
> > Original table
> >Supplier Product List (memo)
> >---------- -------------------------
> >A Product 1
> > Product 2
> >---------- -------------------------
> >B Product 3
> > Product 4
> >
> >---------- -------------------------
> >…
> >
> > The desired table
> >Supplier Product List (text)
> >---------- -------------------------
> >A Product 1
> >---------- -------------------------
> >A Product 2
> >---------- -------------------------
> >B Product 3
> >---------- -------------------------
> >…
> >
> >Look forward to your suggestion. Thanks a lot.

>
> That's going to require some VBA code to parse through the text, looking for
> vbCrLf (new line) delimiters, and parsing each row into fields: i.e. nothing
> automatic and probably not trivial. I wonder if a "cheat" might work - you
> could copy and paste the entire memo field into an Excel spreadsheet, clean up
> the separator hyphens, and extract the rows and columns back into Access.
> --
>
> John W. Vinson [MVP]
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert linked tables to local tables Dhara Microsoft Access 3 31st Oct 2006 01:12 AM
Convert linked tables to local tables Dhara Microsoft Access 1 30th Oct 2006 08:43 PM
rtf to text convert of tables =?Utf-8?B?ZGVuaXNl?= Microsoft Word Document Management 6 11th Jun 2006 10:22 AM
rtf to text convert of tables =?Utf-8?B?ZGVuaXNl?= Microsoft Word Document Management 0 7th Jun 2006 09:30 PM
Convert PPT tables to text Dana Microsoft Powerpoint 1 8th May 2006 04:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 AM.