bounded multiple select listboxes

S

Stan

Hello,

I have read many of your posts, but have not found this case. Could anyone
help me, please?

I have successfully got the results from the listbox to the bounded field.
That is OK.

Now, when re-opening the form later I would like to see that listbox with
selected (highlighted) options (previously saved in the bounded field). IS
THAT POSSIBLE???


Thank you...
stan
 
D

Douglas J. Steele

You can't bind a multi-select listbox to a field. That's because a field can
only contain a single value.
 
S

Stan

Well, thank you Doug.

I just need to specify that someone from my address book likes football
while another likes hockey and basketball. To help the user to enter the
values I thought of list box, which seems to work perfectly for input.

But I still hope there is a way how to highlight the selected rows in the
list according to the value of another field. I do not believe I ned two
field in the form for the same data. One for input and another for display
the entered values.

I would prefer instead of having a textbox with "hockey; football" to
highlight these two options among others in the listbox, which is at the
same time used for data input or change.

I am sorry for my courage - this is just my first contact with listbox. I
believe there must be a simple solution for that simple task. So if you
Doug, or someone else could help me and save me from wasting the time.
THAAAANNKK YOU!

stan
 
R

Rick Brandt

Stan said:
Well, thank you Doug.

I just need to specify that someone from my address book likes football
while another likes hockey and basketball. To help the user to enter the
values I thought of list box, which seems to work perfectly for input.

How are you getting the multiple selections saved in your table? As soon as you
make a ListBox Multi-Selectable it has no Value property other than Null to be
used in the case of binding to a field. If you are using code to traverse the
ItemsSelected collection and writing these to your table, then you would need to
reverse that process to make the Items appear selected as you navigate in
existing records.
 
S

Stan

HEllo Rick,

You are right, after I realised I cannot save anylthing except null from
Multi-Sel Listbox, I collected the values using ItemsSelected ... YES!!! I
can imagine there must be some reversed process, but I CANNOT find out which
it is. Could you please give me an idea, or a short sample?

Thanks
stan
 
R

Rick Brandt

What was your process for storing the values?


Stan said:
HEllo Rick,

You are right, after I realised I cannot save anylthing except null from
Multi-Sel Listbox, I collected the values using ItemsSelected ... YES!!! I
can imagine there must be some reversed process, but I CANNOT find out which
it is. Could you please give me an idea, or a short sample?

Thanks
stan
 

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