List Query Fields

This command fills a table with the names of select queries (omitting those whose prefixes are on the Exclude list), and their field names, and offers to print a report based on that table. The table is shown in Figure 14.23.

Only select queries will be listed. Although queries of other types (action queries) are listed by name in the QueryDefs collection, they have no fields to list.

FIGURE 14.23

A table filled with query names and fields.

FIGURE 14.23

A table filled with query names and fields.

Note the Expr1008 field name, indicating that the same field is included in the query twice. The fields in the table are listed in the order that they occur in the query in design view; the report based on this table gives an alphabetical listing, as shown in Figure 14.24.

The table and report are stored in the calling database, and thus they can be opened later without re-running the menu add-in.

FIGURE 14.24

The Query and Field Names report.

9 Query and Field Marnes

- n

:

iQuery and Field Names

Table Name

Field Name

Data Type

Descriptiorr

Required?

qrylnvoices

Address

10

Text

No

BIToAddress

10

Text

No

BfflToCityStateZip

10

Text

No

BfflToCountry

10

Test

No

City

10

Text

No

C omp anyName

10

Text

Yes

Country

10

Text

No

CustomerlD

10

Text

No

Discount

Single

Yes

ExprlOOS

10

Text

Yes

ExtendedPrice

5

Currency

No

Freight

5

Currency

No

OrderDate

S

Date/Time

No

OrderlD

4

Long Integer

No

T

i

1

Was this article helpful?

0 0

Post a comment