Don't over think this, because I'm MORON.
>On a form I have a listbox and when that listbox returns no results I would like something eles to happen.
>
>"IF IsNull (MyListBox) Then
>DoCmd.Beep
>or
>DoCmd.OpenForm "MyOtherForm"
>Else: GoHere.SetFocus
>
>I'm sure there is some simple code that I can figure out.
>MultiSelect ?
>Colunm(1) is bound
>Thanks Guys
Wayne Morgan - 19 Feb 2005 05:19 GMT
The listbox will have a "value" or be Null if it is NOT multiselect (simple
or extended). If it is multiselect, you have to go through the ItemsSelected
collection to find out which rows have been selected. This collection also
has a Count property. So, if no items are selected then the count will be
zero. This will change your If statement to
If Me.MyListBox.ItemsSelected.Count = 0 Then

Signature
Wayne Morgan
MS Access MVP
> Don't over think this, because I'm MORON.
>>On a form I have a listbox and when that listbox returns no results I
[quoted text clipped - 10 lines]
>>Colunm(1) is bound
>>Thanks Guys