By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,701 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,701 IT Pros & Developers. It's quick & easy.

List Box Column to Memo truncates at 255 characters

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.