How to bound an unbound listbox

  • Thread starter Thread starter Kevin Mayer
  • Start date Start date
K

Kevin Mayer

Could anyone tell me the syntax to bound an unbound listbox to a textbox
control on my form by VBS?

This is what I have:

On open I have a listbox that is populated with an array (which works just
fine) and is option/multi select for the listbox. What I want to be able to
do is when the item is selected in the list box, the result is put into a
textbox that is also unbound.

Thanks in advance

Kevin
 
Write code for the listbox's click event that sets the value of the property to which the text box is bound. See http://www.slipstick.com/dev/propsyntax.htm for details on that event, dealing with unbound control values, etc.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
hope this helps
Sub ComboBox1_Click()
Set ComboBox1= Item.GetInspector.ModifiedFormPages
("Message").ComboBox1
Set TextBox1= Item.GetInspector.ModifiedFormPages
("Message").TextBox1
TextBox1.Text = ComboBox1.List(ComboBox1.ListIndex)
End Sub
 

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

Similar Threads

Access Cannot select items in listbox 1
Unbound ListBox 1
Listbox bound 6
Listbox in Custom Form 13
Unbound Controls 2
Access MS Access Listbox not saving to bound field 0
How to retrieve data from unbound listbox. 2
Update bound ListBox 6

Back
Top