473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Copy first line of a memo field to a text field

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
2 3828

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alfredo Agosti | last post by:
Hi folks, I have an Access 2000 db with a memo field. Into the memo field I put text with bold attributes, URL etc etc What I need to to is converting the rich text contained into the memo...
0
by: Joshua Ginsberg | last post by:
Howdy -- I have a class that has an attribute that is a dictionary that contains an object that has a kword argument that is a lambda. Confused yet? Simplified example: import copy class...
6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
4
by: intl04 | last post by:
I have a memo field that is included in some Access reports I created. Is there some way for the memo field to display nicely formatted text, with line breaks between paragraphs? Or is it necessary...
1
by: Monica Roman | last post by:
Hello, help please. I have a little macro that copies the date from a date/time field to a memo field, BUT instead of going to the memo field it finds the first date/time field and tries to copy...
4
by: Emin | last post by:
Dear experts, I got some unexpected behavior in getattr and copy.deepcopy (see transcript below). I'm not sure if this is actually a bug in copy.deepcopy or if I'm doing something too magical...
1
by: chris | last post by:
I'm not sure this is even feasible. What I want to do is create a command button. When this command button is pressed, it taes field values and puts them into text format. I think I know how to...
4
by: ACF | last post by:
Hello, I'm programming an application in MS Access 2003 / 2007 and would like to know how I can copy highlighted text to the windows clipboard? I am now using a statement in combination with...
0
by: carlton129 | last post by:
Hi! I am trying to copy the current form and subform to the clipboard with the click of a button so that I can paste it in another application. So far, I can get all of the Form info together into...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.