G
Guest
How do I check to see if a list box is empty?
When I open a form if the list box doesn't have any records in it I want to
display a message box. Here is what I have....
Private Sub Form_Load()
If IsNull(Me.lstDrawingNumbers) Then
MsgBox "There are no Drawing Controls for this Machine Number"
DoCmd.Close acForm, "frm_DrawingControls_Edit", acSaveNo
End If
End Sub
This code isn't working right because I get this message box even when I
know there shouldn't be any records in it.
Thanks in advance.
When I open a form if the list box doesn't have any records in it I want to
display a message box. Here is what I have....
Private Sub Form_Load()
If IsNull(Me.lstDrawingNumbers) Then
MsgBox "There are no Drawing Controls for this Machine Number"
DoCmd.Close acForm, "frm_DrawingControls_Edit", acSaveNo
End If
End Sub
This code isn't working right because I get this message box even when I
know there shouldn't be any records in it.
Thanks in advance.