The information in this article applies to:
- Microsoft Access version 2.0
SYMPTOMS
Novice: Requires knowledge of the user interface on single-user computers.
When you use the SetValue macro action to transfer text from a Memo control
on one form to another form that does not have a Memo control, the first
256 characters from the Memo field disappear. The remaining characters are
transferred successfully.
RESOLUTION
Add a control bound to a Memo field to the destination form.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version
2.0. This problem no longer occurs in Microsoft Access version 7.0.
MORE INFORMATION
This problem only occurs if you try to set the value of a Memo field from
another Memo control that contains more than 256 characters. If both forms
contain a control bound to a Memo field, the SetValue action will work as
you expect.
Steps to Reproduce Problem
- Start Microsoft Access, open any database, and create a new table with
the following two fields:
Field Name: ID
Data Type: Counter
Field Name: Memo1
Data Type: Memo
Save the table as Table1.
- Create another new table with the following fields, and then save the
table as Table2:
Field Name: ID
Data Type: Counter
Field Name: Memo2
Data Type: Memo
- Create a new form based on Table1. Add the ID field to the form. Save
the form as Form1.
- Create a new form based on Table2. Add the ID and Memo2 fields to
the form. Save the form as Form2.
- Create the following new macro and then save the macro as TestMemo:
Macro Name Macro Action
--------------------------
TestMemo SetValue
TestMemo Actions
------------------------------------
SetValue
Item: Forms![Form1]![Memo1]
Expression: Forms![Form2]![Memo2]
- View Form2 in Design view. Add a command button to the form, and
then set the command button's OnClick property to the TestMemo macro.
Save the form.
- View both Form1 and Form2 in Form view, and then type the following
line in the Memo2 control.
NOTE: In the following text, an underscore (_) at the end of a line is
used as a line-continuation character. Remove the underscore from the
end of the lines when entering this line.
This is a test to see how many characters are pasted back to the _
first table. This test needs at least 256 characters to demonstrate _
the fact that the first 256 characters will not be pasted to the _
first table. This text is just representative text and can actually _
be any text at all. The total length of this text is 334 characters.
- Click the command button on Form2.
- Look at the contents of the Memo1 field. If you count the characters
in the field, you will note that the first 256 characters of the
text are missing.