Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adding additional text to field

0 views
Skip to first unread message

Gary McCarthy

unread,
May 4, 2009, 12:42:01 PM5/4/09
to
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.

Mr. B

unread,
May 4, 2009, 1:23:01 PM5/4/09
to
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

fredg

unread,
May 4, 2009, 4:40:39 PM5/4/09
to

"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

0 new messages