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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to display a memo field on the form.

Status
Not open for further replies.

mmaglio

Programmer
Jun 20, 2003
28
JP
Good Afternoon, everybody

I have a listbox with the names of companies in it, and i would like to display a description of the company on the form as the listbox is updated.
I have a CompanyID table with the 'name'and 'description' fields. This seems like it should be straightforward, Ive gotten the listbox to change the RowSource of the next listbox on the AfterUpdate event, but i'm having trouble here. The description field is a memo type, if that matters.

Thanks,

Mark
 
Hi,

Can You Clear More Your Problem?

Thanx

" Åä Çááå íÍÈ ÅÐÇ Úãá ÃÍÏßã ÚãáÇ Ãä íÊÞäå "
 
I hope so, here goes:

I have a table 'CompanyID'with the fields 'name' and 'description'.
On the main form, i have a list box (listCompany)which displays all the names of the companies. I would now like to have a text box or something to display the 'description' field for each company. This will probably require some code in the AfterUpdate event of the 'listCompany' box.
hope thats clearer, if there's anything specific maybe i left out, let me know.

Thanks

Mark
 
Okay, Let's Go And Do The Following:

* Create Combobox (ListCompany) To Look Up The Values From Your Table (Name And Description),Instead Of List Box.
* Create A Text Box Name It As CompDesc
* Place This Code On After_Update For The ComboBox:
me.CompDesc = Me.ListCompany.Column(2)

And Let See.

Good Luck

" Åä Çááå íÍÈ ÅÐÇ Úãá ÃÍÏßã ÚãáÇ Ãä íÊÞäå "
 
Thanks HNA,

OK, I tried this, and it didn't work for me. I dont think I'm understanding why I should use a combo box. The listCompany list box is the product of a prior choice: a previous listbox narrows down the list of companies displayed here (i.e. the companies in the box must also sell the type of product chosen in the previous box). Now, to give the user further insight about the companies in this list, I would like to show a description in the text box. I just want to display the description (memo) field for the record of the company the user clicks on. As the user clicks on the companies in the list, the text box displays the different descriptions until they find one that suits their needs.


Right now I get this to show up in the text box:

Select [description] FROM [CompanyID] WHERE [Name] = 'Control Equipment'
(when I click Control Equipment, for example, in the listCompany. The name will change as I click different companies)

using this code in the After_Update for listCompany

Me.CompDesc = "Select [description] FROM [CompanyID] WHERE [Name] = '" & Me![listCompany] & "'"


Thanks,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top