Access + VBA (Vitoria)

Source: Internet
Author: User

The OpenReport method performs the OpenReport operation in Visual Basic.

Grammar

an expression . OpenReport (reportname, View, filtername, wherecondition, Windowmode , OpenArgs)

An expression is a variable that represents a DoCmd object.

Parameters

Name

Required/Optional

Data type

Description

ReportName

Necessary

Variant

A string expression that represents the valid name of the report in the current database. If you execute Visual Basic code that contains the OpenReport method in the class library database, the Microsoft Access report has this name, first looking for the class library database, and then in the current database.

view" >view

optional

AcView

acview constant that specifies the view in which the report would open. The default value is acviewnormal . " > acview  constant, specifying the view in which the report will be opened. The default value is acViewNormal .

filtername" >filtername

optional

Span id= "mt18" class= "sentence" data-guid= "aa7ac8cd5e0a6993a177746279cc00d2" data-source= " Variant "> Variant

wherecondition" >wherecondition

optional

Variant

string expression, which does not contain a valid SQL WHERE clause for the WHERE keyword.

windowmode" >windowmode

optional

Span id= "mt26" class= "sentence" data-guid= "e074541bbabe066ad2b745214bec54e1" data-source= " AcWindowMode "> acwindowmode

acwindowmode constant that specifies the mode in which the form opens. The default valus is acwindownormal . > a AcWindowMode constant that specifies the mode in which the form is opened. The default valus is acwindownormal .

OpenArgs

Options available

Variant

Set the OpenArgs property.

Annotations

You can use the OpenReport method to open a report in Design view or print preview or to print the report immediately. You can also restrict the printing of records in a report.

The maximum length of the WhereCondition parameter is 32,768 characters (whereas in the Macro window, the maximum length of the Where Condition action parameter is 256 characters)

Value of AcView

Name

Value

Description

Acviewdesign

1

Design view

Acviewlayout

6

Layout view

acViewNormal

0

Normal view (default value)

Acviewpivotchart

4

PivotChart view

Acviewpivottable

3

Pivot Table View

acViewPreview

2

Print Preview

Acviewreport

5

Report view

Specifies in which mode to open the form or report.

name

description

acdialog ">acdialog

3

The Modal and PopUp properties of the form or report are set to Yes .

achidden ">achidden

1

The form or report is hidden.

acicon" >acicon

2

The form or report opens in the Windows taskbar in a minimized manner.

acWindowNormal

0

The (default) Form or report opens in a mode that is set by its properties.

Access + VBA (Vitoria)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.