Hi everyone;
I want a text box to display the description of a vendor when I choose that vendor from a list box.
The list box (listVendor) does not show all the vendors in the database. The contents of this list are narrowed by the choice in another list box on the form.
The table 'VendID' has the names of all the vendors (Vendor)(which is the primary key in the table) as well as a description field(Description) and other information which is not important here.
As the user highlights different vendors in the listbox I would like the description field to appear in the text box (the description field is a memo type).
I have been trying to code the listVendor AfterUpdate event to send the description into the text box, without success.
I have been toying with this line of code, because it is similar to the one I am currently using to update the RowSource of listboxes from other listboxes.
Me![Text23] = "Select [Description] FROM [VendID] WHERE [Vendor] = '" & Me![ListVendor] & "'"
I'm not too hot at the VB coding, but this might be close.
Any Ideas? Thanks for the help.
Mark
I want a text box to display the description of a vendor when I choose that vendor from a list box.
The list box (listVendor) does not show all the vendors in the database. The contents of this list are narrowed by the choice in another list box on the form.
The table 'VendID' has the names of all the vendors (Vendor)(which is the primary key in the table) as well as a description field(Description) and other information which is not important here.
As the user highlights different vendors in the listbox I would like the description field to appear in the text box (the description field is a memo type).
I have been trying to code the listVendor AfterUpdate event to send the description into the text box, without success.
I have been toying with this line of code, because it is similar to the one I am currently using to update the RowSource of listboxes from other listboxes.
Me![Text23] = "Select [Description] FROM [VendID] WHERE [Vendor] = '" & Me![ListVendor] & "'"
I'm not too hot at the VB coding, but this might be close.
Any Ideas? Thanks for the help.
Mark