Selasa, 22 Mei 2012

Re: [MS_AccessPros] Run-time error '2501' OpenReport Action was canceled

 

Hi Thomas,

to add to what Steve suggested, it would be a good
idea to use a MsgBox("Nothing to report") after the
' do nothing line, so the user knows what's happening.

Regards, Clive.

--- In MS_Access_Professionals@yahoogroups.com, Steve Conklin <StephenMConklin@...> wrote:
>
>
> Add a catch for err #2501:
> On Error Goto err_Processing
> Docmd.OpenReport "Report ABC", acViewPreview 
>
> err_processing:
> select case err
> case 0, 2501
> ' do nothing
> case else
> msgbox err.description
> end select
> hth
> Steve
>
>
>
> ________________________________
> > To: MS_Access_Professionals@yahoogroups.com
> > From: thomas_lam_us@...
> > Date: Mon, 21 May 2012 22:39:02 +0000
> > Subject: [MS_AccessPros] Run-time error '2501' OpenReport Action was canceled
> >
> >
> >
> > Here is what I already did but still failed with the run-time error
> > message. Appreciate if you can point out where I might have made the
> > mistakes.
> >
> > In my main line processing:
> > On Error Goto err_Processing
> > Docmd.OpenReport "Report ABC", acViewPreview
> >
> > For Report ABC
> > On No Data property
> > Cancel = True
> >
> > Thanks,
> > Thomas
> >
> >
> >
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar