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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|