TextBox using ListBox.Column(2) as ControlSource

D

Denis

I have an unbound form containing a Listbox (lstTip) and a
Textbox (txtTip).

The ControlSource for txtTip is the second column of
lstTip ( =[lstTip].[column](2)) . The source for the
second column of lstTip is a Memo field in tblTip.

When selecting a record in lstTip, I want txtTip to show
the data from the Memo field, however txtTip will only
allow 255 characters (which I know is the limit for a
Textbox). Is there a way to have all the contents of the
Memo field display in txtTip? Is there a workaround this?

Thank you for your help.

Denis
 
J

John Vinson

I have an unbound form containing a Listbox (lstTip) and a
Textbox (txtTip).

The ControlSource for txtTip is the second column of
lstTip ( =[lstTip].[column](2)) . The source for the
second column of lstTip is a Memo field in tblTip.

When selecting a record in lstTip, I want txtTip to show
the data from the Memo field, however txtTip will only
allow 255 characters (which I know is the limit for a
Textbox). Is there a way to have all the contents of the
Memo field display in txtTip? Is there a workaround this?

Thank you for your help.

Denis

A Listbox or Combo Box cannot contain a Memo field (which might be as
big as a gigabyte) in its entirity. Therefore it's truncated. A
textbox *CAN* display an entire memo field, so that's not the problem
- you're filtering out the data in the Listbox.

Try leaving the memo field out of the listbox altogether; if you
cannot base the Form on a query (referencing the listbox as a
criterion), then you can set the control source of the textbox to

=DLookUp("[memofield]", "[tablename]", "[ID] = " [listbox])

where the bound column of the listbox is the unique ID of the record
containing the memo data.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top