Group:  Microsoft Access ยป microsoft.public.access.externaldata
Thread: avoid loading an empty form

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

avoid loading an empty form
segurarl 19.07.2006 16:46:01
How can I avoid loading a form when the source table is empty?

Thank you for you help!
RE: avoid loading an empty form
Klatuu 19.07.2006 17:11:02
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

"segurarl" wrote:

[Quoted Text]
> How can I avoid loading a form when the source table is empty?
>
> Thank you for you help!
RE: avoid loading an empty form
DavidAtCaspian 21.07.2006 12:10:02
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.

"segurarl" wrote:

[Quoted Text]
> How can I avoid loading a form when the source table is empty?
>
> Thank you for you help!
RE: avoid loading an empty form
Klatuu 21.07.2006 12:44:02
I don't think so. Open has nothing to do with forms. There is no way to
cancel an OpenForm action or method.

"DavidAtCaspian" wrote:

[Quoted Text]
> 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.
>
> "segurarl" wrote:
>
> > How can I avoid loading a form when the source table is empty?
> >
> > Thank you for you help!

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net