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!

Truncated Memos

Status
Not open for further replies.

DrGreg1408

Technical User
Feb 8, 2008
30
US
Hey everyone,

I have a form that has a combobox based on an SQL statement that gathers data from a table that is linked to the form's RecordSource table by an ID field. The field shared by the form's RecordSource and the linked table is called Concern_ID. The combobox also captures a memo field from the table tblConcerns. What I wanted to do is this: When the user selected a concern in the concerns combobox, the memo for that selection (which is in the SQL select statement) is fed into an unbound textbox on the form. All works great except for one major problem. The process truncates the memo to 255 characters, cutting off everything beyond that. I know the problem is related to the SQL statement. So, I am aware of the problem. Is there any other way to accomplish what I want to do without truncating the memo field? I hope my explanation is clear.
 
Was your memo field created as a text field initially and then subsequently changed to memo? I have seen the effect you describe in that scenario.

Ed Metcalfe.

Please do not feed the trolls.....
 
The combobox also captures a memo field ". You can not use memo fields in a combobox. They will be truncated to 255 characters. Think about it - memo fields have 65K+ characters. Imagine how big the combobox would be for each record having that large of a memo field.
Look into using the Dlookup function. The user will make a combobox selection, then through coding, the dlookup will find the memo associated with it.
 
How are ya DrGreg1408 . . .

Agree with fneily! [blue]DLookUp[/blue] is certainly a good approach.

However, [purple]having to decide to make a selection[/purple] via a single line of a multiline entry has to tough. [green]A seperate popup form, or hidden subform that becomes visible[/green], [blue]revealing greater content of the memo[/blue] appeals to me.

In any case, your dlookup would look something like:
Code:
[blue]   Dim Cri As String
   
   Cri = "[ConcernID] = " & Me![purple][b]ComboxName[/b][/purple].Column(0)
   Me![purple][b]TextboxName[/b][/purple] = DLookup("[Concern]", "[purple][b]TableName[/b][/purple]", Cri)[/blue]
Out of curiosity . . . what will you do with the unbound textbox once its populated?

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
I appears that the DLookUp solution is working. I see no truncates thus far.

Thanks much.
 
AceMan,

The unbound textbox is used merely to show the user the information that has been previously linked to the main form's information. It's for viewing. I will provide a button to open another form to use in editing an existing record or adding a new one.

It's part of a three page tab control, each page providing different information about project. I am building this database to replace an Excel issues deck that we were using which became very unwieldy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top