By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,923 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,923 IT Pros & Developers. It's quick & easy.

Code that parses a string and puts individual words into a seperate table

P: n/a
I am looking for a VBA routine with a table (tblSentences) and one
long field (field1) is the source

tblSentences
Field1
Did you know that a wild blueberry lies dormant for more than a year
between
growing seasons? That's why we specially select our choice
ingredients.

And another table (tblWords) with one field (FieldWord)

tblWords
FieldWord

The VBA routine goes through each row of tblSentences and puts each
word into tblWords. So tblWords populated looks like:

FieldWord
Did
you
know
that
a
wild
blueberry
..
..
..
Thanks in advance for any help with this!

RBolling

Aug 25 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I don't know what you are trying to accomplish, if anything practical... it
appears from your table structure, every word from every sentence maybe in
tblWords, which would most likely make it useless for any practical purpose.
Thus, I doubt anyone is going to already have, or be interested in preparing
for you, code to do what you describe.

Assuming this is for a homework assignment (and it seems suspiciously as
though it might be), you first should check Help (in recent versions of
Access) for the "Split" command, which will split the sentence into
"whatever text" is separated by the delimiter you specify. A space would
work nicely as the delimiter. In VBA, you'll find that DAO code is somewhat
easier to learn than ADO.

Larry Linson
Microsoft Access MVP

"robboll" <ro*****@hotmail.comwrote in message
news:11**********************@q3g2000prf.googlegro ups.com...
>I am looking for a VBA routine with a table (tblSentences) and one
long field (field1) is the source

tblSentences
Field1
Did you know that a wild blueberry lies dormant for more than a year
between
growing seasons? That's why we specially select our choice
ingredients.

And another table (tblWords) with one field (FieldWord)

tblWords
FieldWord

The VBA routine goes through each row of tblSentences and puts each
word into tblWords. So tblWords populated looks like:

FieldWord
Did
you
know
that
a
wild
blueberry
.
.
.
Thanks in advance for any help with this!

RBolling

Aug 25 '07 #2

P: n/a
On Aug 24, 8:08 pm, "Larry Linson" <boun...@localhost.notwrote:
I don't know what you are trying to accomplish, if anything practical... it
appears from your table structure, every word from every sentence maybe in
tblWords, which would most likely make it useless for any practical purpose.
Thus, I doubt anyone is going to already have, or be interested in preparing
for you, code to do what you describe.

Assuming this is for a homework assignment (and it seems suspiciously as
though it might be), you first should check Help (in recent versions of
Access) for the "Split" command, which will split the sentence into
"whatever text" is separated by the delimiter you specify. A space would
work nicely as the delimiter. In VBA, you'll find that DAO code is somewhat
easier to learn than ADO.

Larry Linson
Microsoft Access MVP

"robboll" <robb...@hotmail.comwrote in message

news:11**********************@q3g2000prf.googlegro ups.com...
I am looking for a VBA routine with a table (tblSentences) and one
long field (field1) is the source
tblSentences
Field1
Did you know that a wild blueberry lies dormant for more than a year
between
growing seasons? That's why we specially select our choice
ingredients.
And another table (tblWords) with one field (FieldWord)
tblWords
FieldWord
The VBA routine goes through each row of tblSentences and puts each
word into tblWords. So tblWords populated looks like:
FieldWord
Did
you
know
that
a
wild
blueberry
.
.
.
Thanks in advance for any help with this!
RBolling- Hide quoted text -

- Show quoted text -
Nope -- not a student. Just trying to become more versitile with
VBA. I actually found something here:
http://www.mvps.org/access/strings/str0003.htm

Believe it or not there are a lot of uses for this process!

Thanks!

RBolling

Aug 25 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.