Access 2003, how do I know if a listbox has no row selected?

  • Thread starter Thread starter H. Martins
  • Start date Start date
H

H. Martins

Hi.

Say I have a textbox and a listbox.

The text box is not supposed to be clicked if one of the listbox rows
(anyone) has not not been selected.

How do I detect that no row has been previously (still, is) selected?

Thanks
H. Martins
 
Hi.

Say I have a textbox and a listbox.

The text box is not supposed to be clicked if one of the listbox rows
(anyone) has not not been selected.

How do I detect that no row has been previously (still, is) selected?

Thanks
H. Martins

You can use the Selected property in Visual Basic to determine if an
item in a list box is selected. Read/write Long.

So set the textbox enabled property to false, and change it to true
only after checking that the listbox has at least one row selected.
 
Hi.

I tried several ways and I couldn't get anything from
lstbxAlunos.Selected
I wonder why!

I tried something like
txtbxDebug = lstbxAlunos.ItemsSelected.Count
and it works ok. It returns 0 (zero) is nothing is selected.

Thanks
H. Martins
 
Back
Top