Re: Blank Form



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
.