multi selecting items in a list box based on values from a text box


S

Sidd

Hi,

I am sure this should not be too complex for you.

I have a multi-select list box that feeds into 5 text boxes on an MS
Access 2003 form. Based on the text box checked (I am using check
boxes to highlight which text box should hold the values from the list
box), when I select items from the list box, the values are stored in
the respective text box as item1, item2, item3,... and so on. It is
fine till here.

If I want to add one more items in one of the text boxes, I want that
when I click on the text box the values from the text box should be
automatically selected in the list box. Also, when I browse through
the records on the form, I can see the values in the text box,
however, the same are not selected in the list box.

Can someone help here?

Thanks!
Sidd
 
Ad

Advertisements

K

Klatuu

Your multi select list box is not a bound control, so it will not change as
the records change. The simple solution is to requery the list box in the
form's current event.

As to chaning values in the list box when you change or add data in a text
box, you will have to write a function that finds the value in the list box
and selects it. I would write one function and pass the name of the current
control to the function to tell it which control to use in the routine. Then
I would call this function from the After Update event of each of the text
boxes.
 

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