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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo Field and number of characters 3

Status
Not open for further replies.

ribbons

Technical User
Apr 26, 2007
113
US
Hi all,

I have an Access Db that contains a memo field with rather lengthy text entries. I also have a form on which I want to display the info in the memo field in a text box. I believe I have read that text boxes will accomodate up to 64,000 characters from a memo field. But for some reason, I can only get a limited number of characters to display in this text box. I can look at the table itself and see the complete memo entry. So, am I missing something here?

ribbons
 
I could be massively wrong here but aren't textboxes limited to 2048 characters?

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Hmm, managed to confuse textboxes and labels there somehow [blush]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Is there some setting I have overlooked maybe to allow this text box to display data from this memo field??

ribbons
 
Do you have the textbox bound to the field? If not how are you setting the text in the textbox? How many characters are being displayed?

Cheers

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
It's displaying 255 characters. That's why I'm wondering if there is some setting I'm overlooking. In the DB, the field is set to memo. Do I have to "turn something on" in the form to make it display up to 65,000?

ribbons
 
Is the box bound straight to a table? A query?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
The text box (Message) for this memo field is filled by the selection from a combobox above it. Here's the code that fills it:

Code:
Private Sub cboregulated_AfterUpdate()
Me.Message = Me.cboregulated.Column(1)
End Sub

The combobox (cboregulated) is filled by a 2-column query. The Message text box is filled by Column 1. Could it be that the query is limiting the characters?

ribbons
 
Quite possibly, some queries can truncate the values of a memo field (specifically SELECT DISTINCT and some GROUP BY from memory).

What does the query look like and what are the results when you run it as a query? Does it return the full memo field then?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Could well be the column in the combobox limiting the number of characters, that's what seemed to happen in my tests...

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Yes, if I run the query, it returns all records.

This seems pretty simple at conception.

This table has two fields, Regulatedarticles and messages.

The combobox(cboregulated)'s record source is the following query:
Code:
SELECT tbl_lookup_messages.REGARTICLE, tbl_lookup_messages.Message
FROM tbl_lookup_messages;

The text box (Messages) is fed from the second column of this query, but it is selected through cboregulated. I wonder if somehow in this, the characters are truncated. And, if so, is there another way to select from Column 1 of this query and have the contents of Column 2 show up?

ribbons

 
You could base a query (showing only the memo field ) with criteria based on the combobox value and set the source of the textbox to it.

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Memo fields CANNOT be in comboboxes. Think about it and it makes sense. Can you image comboboxes that show records with 65k+ characters in a field? So it's truncating the memo field.
 
Ok, so how's the bet way to do this.

HarleyQuinn, could you elaborate a little more on your suggestion? The text box (message) is bound to a field in a table. Whatever appears in the box, when the selection is made in the combobox, is stored in the table. I don't see a way to set the source of the text box as you've suggested.

ribbons
 
Fancy giving fneily a helpful star for that?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
I'll do it then...

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 

Although solution has been found, queries do truncate memo fields to 255 chars in length. If the Memo field was coming from the table itself you would not notice that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top