473,657 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3850

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******** *************@m 79g2000cwm.goog legroups.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
8667
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 field in plain text. That's because I truncate the string text but if, when I truncate it there's a rich tag the code following the truncated string is corrupted. Don't know if it's clear enough.
0
1688
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 Foo: def __init__(self, fn=None):
6
10449
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 field, and it works. But, it seems wrong since I had to create a huge text box to accommodate memo fields with a lot of text. Thanks for any help, ShyGuy
4
22748
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 to export the report? I tried exporting a report by using the .rtf rich-text format (the plain-text format was the only other word-processing option listed when exporting). I then opened the .rtf file in Word. However, it looks like some...
1
2039
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 there. My first thought is to change the date to text but how? Thanks!!! Monica
4
3673
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 with getattr. Comments would be appreciated. Thanks, -Emin
1
4292
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 do this part thru code. Then I want to copy this text to the clipboard so that I can paste it into a memo field. This is the part I need help with. I will create the text by the following method on the On Click Event of the command button:
4
10346
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 module "Call ClipBoard_SetData(Memo)" but this copies the whole 'memo' field. I want to highlight text in the memo field and copy only that text to the clipboard. What I really want is the VBA code for window's to copy selected text to the...
0
1533
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 a memo using the setvalue feature in a macro. Then, I setfocus to that memo field and run the copy command. I get it all except for the info in the subfom. I try to reference the subform but I get an "automation error". Also, How do I force a...
0
8385
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8723
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.