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

Copy first line of a memo field to a text field

P: n/a
I'm setting up a resolutions database where each resolution will be
copied from Word documents and pasted into a memo field. The resolution
will be in the form:

Resolution title <cr>
Project no <cr>
Date <cr>
Meeting Type <cr>
Resolution (up to several paragraphs separated by carriage returns
etc).

eg:

Inquiry into sportsground management
35002
20/07/06
Board Meeting
"That in relation to this issue we write to xyz, etc..."

The resolutions are often quite long and their formatting complex,
which precludes converting the memo into a table first up in Word. I
also want to copy each resolution with its formatting intact because as
well as being pasted into a text field it is also pasted into an rtf
field using Leban's rich text control. Each resolution has to be copied
manually - there is a lot of other stuff in the documents from which
they will be copied, which makes it difficult to do this
programatically - so I want to make the pasting into the Access table
as painless as possible.

Once the resolution is pasted into the text field, I simply want to
select and copy the first line only (the Resolution title) and paste it
into a text field in the same table. The line itself doesn't have to be
parsed - I'm happy to take everything as far as the carriage return.
I've seen a range of possible solutions but the've all tended to trying
to do something much more complex, like splitting lines into separate
words, etc (also my programming experience is fairly limited, espcially
in Access).

Ideally I'd like to be able to do the same to the 2nd, 3rd and 4th
lines, but this is not essential - its the first line that's the most
important as I want to have a resolutions title field.

Thanks

Alex

Jul 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

al****@msn.com.au wrote:
I'm setting up a resolutions database where each resolution will be
copied from Word documents and pasted into a memo field. The resolution
will be in the form:

Resolution title <cr>
Project no <cr>
Date <cr>
Meeting Type <cr>
Resolution (up to several paragraphs separated by carriage returns
etc).

eg:

Inquiry into sportsground management
35002
20/07/06
Board Meeting
"That in relation to this issue we write to xyz, etc..."

The resolutions are often quite long and their formatting complex,
which precludes converting the memo into a table first up in Word. I
also want to copy each resolution with its formatting intact because as
well as being pasted into a text field it is also pasted into an rtf
field using Leban's rich text control. Each resolution has to be copied
manually - there is a lot of other stuff in the documents from which
they will be copied, which makes it difficult to do this
programatically - so I want to make the pasting into the Access table
as painless as possible.

Once the resolution is pasted into the text field, I simply want to
select and copy the first line only (the Resolution title) and paste it
into a text field in the same table. The line itself doesn't have to be
parsed - I'm happy to take everything as far as the carriage return.
I've seen a range of possible solutions but the've all tended to trying
to do something much more complex, like splitting lines into separate
words, etc (also my programming experience is fairly limited, espcially
in Access).

Ideally I'd like to be able to do the same to the 2nd, 3rd and 4th
lines, but this is not essential - its the first line that's the most
important as I want to have a resolutions title field.

Thanks

Alex
Forgot to add that I'm doing this via a form.

Alex

Jul 25 '06 #2

P: n/a
left([MemoField],instr(1,[MemoField],vbCrLf)-1)
Should give you everything upto the 1st <cr>, Resolution title would have to
be on the 1st line.

<al****@msn.com.auwrote in message
news:11*********************@m79g2000cwm.googlegro ups.com...
I'm setting up a resolutions database where each resolution will be
copied from Word documents and pasted into a memo field. The resolution
will be in the form:

Resolution title <cr>
Project no <cr>
Date <cr>
Meeting Type <cr>
Resolution (up to several paragraphs separated by carriage returns
etc).

eg:

Inquiry into sportsground management
35002
20/07/06
Board Meeting
"That in relation to this issue we write to xyz, etc..."

The resolutions are often quite long and their formatting complex,
which precludes converting the memo into a table first up in Word. I
also want to copy each resolution with its formatting intact because as
well as being pasted into a text field it is also pasted into an rtf
field using Leban's rich text control. Each resolution has to be copied
manually - there is a lot of other stuff in the documents from which
they will be copied, which makes it difficult to do this
programatically - so I want to make the pasting into the Access table
as painless as possible.

Once the resolution is pasted into the text field, I simply want to
select and copy the first line only (the Resolution title) and paste it
into a text field in the same table. The line itself doesn't have to be
parsed - I'm happy to take everything as far as the carriage return.
I've seen a range of possible solutions but the've all tended to trying
to do something much more complex, like splitting lines into separate
words, etc (also my programming experience is fairly limited, espcially
in Access).

Ideally I'd like to be able to do the same to the 2nd, 3rd and 4th
lines, but this is not essential - its the first line that's the most
important as I want to have a resolutions title field.

Thanks

Alex

Jul 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.