Check box in a list box

Soma_rich

Registered User.
Local time
Today, 15:12
Joined
May 2, 2007
Messages
58
I dont know if this is possible but I want to change a yes/no field from a list box.

I can load data in fine I can even loop through it to see what value each item is but, is it possible to allow a user to change a value from a list box?

If not do I have to use the Datasheet view?
 
you can either use a list box or a combobox.

For either one, set the following

controlsource - name of your field
rowsourcetype Value List
rowsource -1,"Yes",0,"No"
Bound Column 1
ColumnCount 2
Column widths 0
Limittolist yes
allowvaluelist edits no

Note that listboxes work like combo boxes in datasheet view
 
@CJ I think the OP is asking for a listbox of values AND the checkbox.

You could do some VB code in the Double Click event to change the value in the table to the opposite of what is selected. As for a literal "Checkbox" next to your values, no this isn't possible with a listbox.
 
@TJ - if he is then you can do it with a subform utilising a disconnected ADODB recordset, but that is quite complex so we'll wait and see what the OP says:)

It can also be done using a multivalue field (2007 and later) but I prefer to stay away from those.
 
There are controls that have tickboxes within lists. Look into the Listview control (not the faint hearted).
 
Thanks CJ that is exactly what i'm trying to do, I have managed it with a double click event now, I just thought there might be a control to do that.

Cheers
 

Users who are viewing this thread

Back
Top Bottom