TextBox using ListBox.Column(2) as ControlSource

  • Thread starter Thread starter Denis
  • Start date Start date
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
 
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
 
Back
Top