473,800 Members | 2,304 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Checking for Text & Moving to the end of a Memo Field

PMB
Thank you in advance for any and all assistance.

I'm trying to input data from strings to a memo field. I would like to know
how to check first to see if there is text there currently and if so move to
the end and input the new text.

Also, would like to know if I can change the justification on each line of
text as it's entered. i.e.

Company Name, address, city state and zip would be centered and all the
other data would be left or right justification?

Michael
Nov 12 '05 #1
2 2510
Your memo field simply stores the inputted text, along with any formatting
options you have selected (font color, bold, etc). Your form control would
have to handle the acutal formatting of the text, and the control would have
to be one that "understand s" formatting (like the RichText control that is
included with the Developer edition). Note that there are some problems with
the RichText included with MOD, the most problematic of which is they do NOT
work on reports (you can get around this and display the text but NO
formatting). FMS sells a Memo control that does work on reports, and it's
easier to deal with that the Richtext box, but it's pricey.

To determine whether or not you have text, you can check the Len() of the
table field, then append your data to the end of the string:

If Len(Me.NameOfYo urRichtextContr ol.Object.Text) > 0 Then
Me.NameOfYourRi chTextControl & YourData
End If

Note that you must refer to the .Object of the RichText control to determine
the text length (which is a property exposed by the RichText control).

Finally, I'm not sure how effective your design will be IF you are saving
this information to the database. Generally speaking name/address
information should be stored in separate datafields. If you're trying to
print this information, remember that the RichText control does NOT work on
reports.
--
Scott McDaniel
CS Computer Software
www.thedatabaseplace.net

"PMB" <pm*****@megavi sion.com> wrote in message
news:jN******** ******@news.usw est.net...
Thank you in advance for any and all assistance.

I'm trying to input data from strings to a memo field. I would like to know how to check first to see if there is text there currently and if so move to the end and input the new text.

Also, would like to know if I can change the justification on each line of
text as it's entered. i.e.

Company Name, address, city state and zip would be centered and all the
other data would be left or right justification?

Michael

Nov 12 '05 #2
PMB
Scott,

Thank you for the help. I have the Memo field on the parent form and am
calling to apply or append the data from the child form.

Michael
"Scott McDaniel" <scott@NOSPAM__ thedatabaseplac e.net> wrote in message
news:8a******** ************@co mcast.com...
Your memo field simply stores the inputted text, along with any formatting
options you have selected (font color, bold, etc). Your form control would
have to handle the acutal formatting of the text, and the control would have to be one that "understand s" formatting (like the RichText control that is
included with the Developer edition). Note that there are some problems with the RichText included with MOD, the most problematic of which is they do NOT work on reports (you can get around this and display the text but NO
formatting). FMS sells a Memo control that does work on reports, and it's
easier to deal with that the Richtext box, but it's pricey.

To determine whether or not you have text, you can check the Len() of the
table field, then append your data to the end of the string:

If Len(Me.NameOfYo urRichtextContr ol.Object.Text) > 0 Then
Me.NameOfYourRi chTextControl & YourData
End If

Note that you must refer to the .Object of the RichText control to determine the text length (which is a property exposed by the RichText control).

Finally, I'm not sure how effective your design will be IF you are saving
this information to the database. Generally speaking name/address
information should be stored in separate datafields. If you're trying to
print this information, remember that the RichText control does NOT work on reports.
--
Scott McDaniel
CS Computer Software
www.thedatabaseplace.net

"PMB" <pm*****@megavi sion.com> wrote in message
news:jN******** ******@news.usw est.net...
Thank you in advance for any and all assistance.

I'm trying to input data from strings to a memo field. I would like to know
how to check first to see if there is text there currently and if so move to
the end and input the new text.

Also, would like to know if I can change the justification on each line

of text as it's entered. i.e.

Company Name, address, city state and zip would be centered and all the
other data would be left or right justification?

Michael


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8697
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.
6
10477
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
0
2336
by: Jacky11 | last post by:
When adding anything in a query next to a field with Data type = Memo, like this Combined: ! & ! Or Combined: ! & "instock" The query will not display more than 256 characters. (The field is a Memo type, and the properties is set to Unicode Compression = Yes) How do fix this problem?
13
2548
by: MLH | last post by:
I have a form with two controls: !! - combo box !! - text box A button on the form tries to run this SQL when clicked... INSERT INTO BodyMsgsSent (ToWhom, BodyText) SELECT DISTINCTROW !! AS MyTargets, !! AS MyList; When the SQL runs, it fails with msg saying "Field length is too
0
1382
by: Lauren Wilson | last post by:
The error does not have an error number. It's not even a normal Access error message box. Hope someone has some insight to this problem. I have a form that contains a large (5" x 4") text box bound to a memo field. This field allows users to type in the text of an email to be sent through Outlook (via automation). I ONE user who send me his back end data base where he has inserted several two - three page emails. When scrolling...
1
3059
by: alexsg | last post by:
A little while ago Ron P kindly responded to my inquiry on how to copy the first line of memo field into a text field, using a query: left(,instr(1,,vbCrLf)-1) This is great, but I would like to do this on a form, so that the person entering the memo can use a button to paste the 1st line to a title (text) field. I'm having trouble setting up the code to do this. I'd also appreciate some ideas on how to get the 2nd and 3rd lines...
2
3390
by: Roger | last post by:
I've got two tables in sql2005 which have an 'ntext' field when I linked the first table in access97 last week using an odbc data source the access-field type was 'memo' when I link the 2nd table today, it is linked as a text(255) field, ditto for the first table if I link it today if I link the 2nd table using access2003 (and the same odbc data source) it is linked as a memo field
1
4372
by: barbara_dave | last post by:
Hi all, I want to change a field data type from Text to Memo.The reason is I need to type more text in that field. when I was saving the change I got error message "The width of a Unicode text column must be an even number of bytes." Could some one tell me what I can do with this message and how I can change the existing text field to memo field?
6
2749
by: maxx429 | last post by:
I am trying to check if notes have been added to a Memo field on a form if certain other fields have changed. Example: If the user ticks a particular check box on the form, I want to force them to add some note detailing the change before the will be allowed to save the record. I have the checks on the other fields working. What I can't seem to find an effective method for is checking whether the user has added notes to the Memo field on the...
0
9690
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
9551
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
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
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
10033
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...
0
9085
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
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
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.