G Guest Jul 19, 2006 #1 How can I avoid loading a form when the source table is empty? Thank you for you help!
G Guest Jul 19, 2006 #2 The best place is in the form's Load event: If Me.Recordset.RecordCount = 0 Then MsgBox "No Records To Process" DoCmd.Close End If
The best place is in the form's Load event: If Me.Recordset.RecordCount = 0 Then MsgBox "No Records To Process" DoCmd.Close End If
G Guest Jul 21, 2006 #3 Or, if you go into VB and search help for "open", it will tell you how to cancel the open event. - This may be a few milliseconds quicker than closing it after laod.
Or, if you go into VB and search help for "open", it will tell you how to cancel the open event. - This may be a few milliseconds quicker than closing it after laod.
G Guest Jul 21, 2006 #4 I don't think so. Open has nothing to do with forms. There is no way to cancel an OpenForm action or method.
I don't think so. Open has nothing to do with forms. There is no way to cancel an OpenForm action or method.