Why Do Memo Fields Sometimes Cause Trouble?

Search

 by Remas Wojciechowski

This article gives answer the the Top 5 VFAQ: What's wrong with my memo (Access) or text (SQL Server) fields.

Memo fields indeed cause trouble if they are not handled properly. Here are the rules you need to follow in order to spare yourself from trouble.

In your SQL statement's field list...
...always enumerate the memo field at the end of the list. Additionally avoid using the asterisk (*) as then the field order is determined by the creation order--be explicit.
If several memo fields are involved...
...enumerate them in the order they were created.
To access the value of the field...
...store the value in a variable and then use the variable throughout your script. The Recordset object behaves correctly only upon the first access to a memo field.