Re: Re-Post: FitToWindow

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: fredg (fgutkind_at_example.invalid)
Date: 07/27/04


Date: Tue, 27 Jul 2004 21:19:50 GMT

On Tue, 27 Jul 2004 12:55:04 -0700, Ashley wrote:

>>-----Original Message-----
>>"Ashley" <anonymous@discussions.microsoft.com> wrote in
> message
>>news:522d01c4740f$68a43560$a601280a@phx.gbl...
>>>
>>> >-----Original Message-----
>>> >On Mon, 26 Jul 2004 15:16:46 -0700, Ashley wrote:
>>> >
>>> >> Could I have the report to open in the "fit to
> window"?
>>> >> Anyone know how to write a command on report open?
>>> >>
>>> >> Thanks
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> >If you open the report from an event on a form, use:
>>> >
>>> >DoCmd.OpenReport "ReportName", acViewPreview
>>> >DoCmd.RunCommand acCmdFitToWindow
>>> >--
>>> >Fred
>>> >Please only reply to this newsgroup.
>>> >I do not reply to personal email.
>>> >.
>>>
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> >I got Run-Time Error '2046':
>>> This command or action 'FitToWindow' isn't available
> now.
>>> How can I fit this error?
>>> Ashley
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>
>>Where did you put the code?
>>
>>
>>--
>>I don't check the Email account attached
>>to this message. Send instead to...
>>RBrandt at Hunter dot com
>>
>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> I put the code in the Report Event on Open.
>>Ashley
>>>>>>>>>>>>>>>>>>>>>>

It doesn't belong in the Report Open event.

>>> >If you open the report from an event on a form, use:

>>> >DoCmd.OpenReport "ReportName", acViewPreview
>>> >DoCmd.RunCommand acCmdFitToWindow

If you open the report by means of a command button on a form, the
code goes in the command button Click event, just under the OpenReport
line, exactly as I indicated above.

-- 
Fred
Please only reply to this newsgroup.
I do not reply to personal email.


Relevant Pages

  • Re: Problem with Dateserial
    ... > on a report that will open shortly - the form will still be ... DateSerial requires three arguments and you are only supplying two? ... I don't check the Email account attached ... RBrandt at Hunter dot com ...
    (microsoft.public.access.gettingstarted)
  • Re: Beginners Question
    ... "Bob Farquharson" wrote in message ... > I am trying to produce a report with additional text and ... I don't check the Email account attached to this message. ... RBrandt at Hunter dot com ...
    (microsoft.public.access.reports)
  • Re: How to detect that user click on close button (x)
    ... change your forms property Modal = yes and popup = yes. ... (command buttons) ... >I don't check the Email account attached ... >RBrandt at Hunter dot com ...
    (microsoft.public.access.modulesdaovba)
  • Re: View whole form
    ... > You open the report with a filter applied so that it only contains the one ... > I don't check the Email account attached ... > RBrandt at Hunter dot com ...
    (microsoft.public.access.gettingstarted)
  • Re: Format number in Report
    ... >> can I set the properties in a report to do this? ... >I don't check the Email account attached ... >RBrandt at Hunter dot com ...
    (microsoft.public.access.reports)