A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding additional text to field



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2009, 05:42 PM posted to microsoft.public.access.forms
Gary McCarthy[_2_]
external usenet poster
 
Posts: 14
Default Adding additional text to field

I am writing standard text to a memo field when a certain process runs.
However, there are occasions when text will already be present in the field.
I have tried several variations of concatenation and variables with no
success.

How can I have additional text added without deleting the old text?

For example, if original text is ABCD and process text is EFGH, then I would
want result in field to be ABCDEFGH.

Thanks.
  #2  
Old May 4th, 2009, 06:23 PM posted to microsoft.public.access.forms
Mr. B[_4_]
external usenet poster
 
Posts: 171
Default Adding additional text to field

Hi, Gary.

I will assume that the process is running behind a form and that the fields
are on the same form.

At the end of your process try something like this:

If not isnull(me.NameOfMemoControl) then
Dim strCurMemoVal as String
Dim strProcessText as String
'assign the current value of the memo control to a variable
strCurMemoVal = me.NameOfMemoControl
'assign the process text to a variable
strProcessText = (here you will have to provide the value)
'add the process text to the original value
strCurMemoVal = strCurMemoVal & strProcessText
'place the new memo value into the memo control
me.NameOfMemoControl = strCurMemoVal

You will have to provide the text from your process as I don't know how or
where it is comming from.

-----
HTH
Mr. B
askdoctoraccess dot com


"Gary McCarthy" wrote:

I am writing standard text to a memo field when a certain process runs.
However, there are occasions when text will already be present in the field.
I have tried several variations of concatenation and variables with no
success.

How can I have additional text added without deleting the old text?

For example, if original text is ABCD and process text is EFGH, then I would
want result in field to be ABCDEFGH.

Thanks.

  #3  
Old May 4th, 2009, 09:40 PM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Adding additional text to field

On Mon, 4 May 2009 09:42:01 -0700, Gary McCarthy wrote:

I am writing standard text to a memo field when a certain process runs.
However, there are occasions when text will already be present in the field.
I have tried several variations of concatenation and variables with no
success.

How can I have additional text added without deleting the old text?

For example, if original text is ABCD and process text is EFGH, then I would
want result in field to be ABCDEFGH.

Thanks.


"when a certain process runs"? What does that mean? Is that running
VBA code?
Where is that "certain process" taking place?
On the form's Class code sheet?

You do not wish a space or new line between the old and new text?

Me.[MemoField] = Me.[MemoField] & "New Text here"

If by a "certain process" you mean something else, I think you have to
explain yourself a bit better.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.