468,136 Members | 1,432 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

List Box Column to Memo truncates at 255 characters

Hi Everybody

I have a Listbox that has a Memo field attached to it's 2nd column
which on double click copies the memo field to another Memo Field.

Forms![frmCustomerWriteInvoice]![MemoCustomerNotes] =
ListClassification.Column(1)

My problem is that the receiving Memo Field Truncates at 255
characters

I have checked in the tables to see if it is connected to a memo
field, but thats not the problem.

Also, the List box was not made with the wizard and definately has the
field in question column(1) a Memo field.

Anyone got any ideas

Thanks in advance

Bob Dydd

smiley Bob
Nov 13 '05 #1
2 4884
Hi Bob,

Instead of adding a memo field to your list box you could have some
other text field on your form. When a user selects from the list box,
the contents of the memo field for the selected record get displayed in
a text box. If the user double clicks on the list box selection you
take the record ID (column(0) is popular for that) and copy the contents
of the memo field for that record to your other table:

Private Sub List1_DblClick(Cancel As Integer)
Dim strSql As String, str1 As String
str1 = DLookUp("Memofld", "tbl1", "ID = " & List1.Column(0))
strSql = "Update tbl2 Set MemoFld = '" & str1 & "' Where ID = " &
List1.Column(0)
DoCmd.RunSql strSql
End Sub

If your memo field contains large data, DAO may be faster than DLookUp.
DLookUp may even have some limitations and how much data it can return
(don't really know about that).

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #2
DFS
Bob Dydd wrote:
Hi Everybody

I have a Listbox that has a Memo field attached to it's 2nd column
which on double click copies the memo field to another Memo Field.

Forms![frmCustomerWriteInvoice]![MemoCustomerNotes] =
ListClassification.Column(1)

My problem is that the receiving Memo Field Truncates at 255
characters

I have checked in the tables to see if it is connected to a memo
field, but thats not the problem.

Also, the List box was not made with the wizard and definately has the
field in question column(1) a Memo field.

Anyone got any ideas
Use an ID in your listbox to retrieve the Memo contents from the table. I
use this, for instance, to show a help topic or long description on the
screen.

The OnClick event of your listbox will contain something like this:

Me.lblDescription.caption = ""
Me.lblDescription.caption = DLookup("MemoField","Table","ID = " &
me.listBox.column(n) & "")

Thanks in advance

Bob Dydd

smiley Bob

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by jimmyshaw83 | last post: by
2 posts views Thread by jacoballen | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.