avoid loading an empty form

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
I don't think so. Open has nothing to do with forms. There is no way to
cancel an OpenForm action or method.
 
Back
Top