Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo size restriction?

Status
Not open for further replies.

wyman

Technical User
Mar 11, 2002
6
0
0
CA
Hi,

I am experiencing a problem pulling the "full" content of a memo field in a query. It seems to limit the return to a maximum of 255 characters. Is there a solution to this problem, whereby a query can be written to pull ou the complete contents of the field in Access 2000?

Thanks,

Wyman
 
Hi

If it is stopping at 255, you have defined a text field, not a memo, unless there is some other VBA code which has been introduced to limit the field to 255 Hope this helps

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
 
As KenReay say there must be some other limitation being imposed on this field. A query that is selecting a memo field from a table will return the entire memo field. Now if you are using the query as the RowSource for a ComboBox possibly and extracting the memo field data through the me![comboboxname].column(3) syntax then ACCESS will truncate your memo field and give you only the 255 characters. But, if you run the query straight and just use the field directly you should get the full memo field data.

Explain a little more about just how you are using the query and how you are extracting the column of data and using it elsewhere and we may be able to help you further. Bob Scriver
 
Hi,

Thanks for the replies. From what I can see, even a simple query to extract the contents of the field will truncate the contents to 255. The entire content can be extracted in parts though, using the "MID" command and then extracting the contents in 'clusters' of 255 characters. I figured that by virtue of the field containing more than 255 characters would preclude it from being any other field type but memo.
Example:
SELECT[memo]
FROM TestTable;
Would return only 255 characters. Thanks for the help anyways. I must add that this database was created by someone else, and we are simply trying to extract the information into SQL.

Thanks once again.
wyman
 
You need to make use of the windows clipboard to do something like this. Copy the information from the field to the clipboard and then paste it somewhere else. If you need to manipulate what's in the memo, I use MS Word to do that (automatically from code).
Onwards,

Q-
 
Wyman, are you interested in doing this on a single record at a time in the query or are you going to be pulling up multiple rows. With the addition of a little VBA code we can pickup the Memo data and store it in a Global variable that can be added as a column in your query through a Function call. This can be done quite easily with a single record selection and a little more tricky if you are going to do it with multiple row selections in the query.

Let me know and I will display the code and the process. Bob Scriver
 
Wyman, the memo field can be picked up using a recordset FindFirst and storing the memo in a variable. This does not restrict the number of characters captured. You will pick up whatever the memo field has stored in it. Bob Scriver
 
Did you try to make it a 'make-table' query? I had problems in the past where a simple select query would cut-off a memo field on 255 chr., but simply changing it to a make-table query kept the memo field complete.

EK
 
I had a similar problem using a Report based on a Query containing a Memo field.
I got round it by replacing the reference to the Query item in the report with a DLookup to the original table.. Works well for me! May well work in other circumstances, eg on export.

Example:
DLookup "[myMemoField]", "myOriginaltable", "[myMatchFieldinReport]= [myOriginaltable]![myTableMatchItem]")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top