Re: Blank Form
- From: "jervin via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 06:55:21 GMT
Thanks for your quick reply ...i will surely try this...
Salad wrote:
>> Good Day,
>> I want to get rid of the blank form everytime i open. I had a form link with
>> a query and i wanted to prompt me sayin "data not found" instead of showing a
>> blank form. i just dont know how to do that...thanks ....
>
>If Me.Recordsetclone.RecordCount = 0 then
> msgbox "There are no records"
> Cancel = True
>End if
>
>You can put that line in the form's OnOpen event
>
>If this form is called by another form, in the Calling form event that
>opens the form, you'll want to trap error 2501.
>
>Sub OpenFormExample()
>On Error Goto ErrProc
> Docmd.OpenForm "ABC"
>Exit_Proc:
> Exit Sub
>ErrProc:
> If Err.Number <> 2501 then msgbox Err.Description
> Resume Exit_Proc
>Exit Sub
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200508/1
.
- References:
- Blank Form
- From: jervin via AccessMonster.com
- Re: Blank Form
- From: Salad
- Blank Form
- Prev by Date: locking down tables
- Next by Date: I used to see a menu item/short cut menu to translate macros to code
- Previous by thread: Re: Blank Form
- Next by thread: locking down tables
- Index(es):