473,473 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Create 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 2472
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 "understands" 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.NameOfYourRichtextControl.Object.Text) > 0 Then
Me.NameOfYourRichTextControl & 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*****@megavision.com> wrote in message
news:jN**************@news.uswest.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__thedatabaseplace.net> wrote in message
news:8a********************@comcast.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 "understands" 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.NameOfYourRichtextControl.Object.Text) > 0 Then
Me.NameOfYourRichTextControl & 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*****@megavision.com> wrote in message
news:jN**************@news.uswest.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
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...
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...
0
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...
13
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...
0
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...
1
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...
2
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...
1
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...
6
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...
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:
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...
0
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,...
0
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...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.