Hi,
As the title suggests Im trying to close a form using VBA if a listbox is empty as per
It works if I comment out the If listcount bit, but I only want users to close it if its empty. Is it me being simple?Code:Private Sub CloseApprovalForm_Click() If TimeApproval_lstbox.ListCount = 0 Then DoCmd.Close acForm, "frm_TimesheetApproval", acSaveNo End If End Sub
Thanks