List Box Question

  • Thread starter Thread starter David W
  • Start date Start date
D

David W

Is there a way to refer to a listbox being empty?

What I am trying to accomplish is to open a form as hidden, check to see if
the list box has any data in it and if not , close it and if ti does to show
it, I tried with no previal - ANY IDEALS?

I tried this

DoCmd.OpenForm "reminder", , , , , acHidden
If IsNull(Forms!reminder.List4) Then
DoCmd.Close acForm, "reminder"
Else
DoCmd.Close acForm, "reminder"
DoCmd.OpenForm "reminder"
End If

Thanks
David
 
If Forms!reminder.List4.ListCount = 0 Then
DoCmd.Close acForm, "reminder"
Else
DoCmd.Close acForm, "reminder"
DoCmd.OpenForm "reminder"
End If
 
Back
Top