HandsOn Writing the Report Page Event Procedure

This hands-on uses the rptCustomers report created in Hands-On 25-1.

1. In the Visual Basic Editor Code window for the rptCustomers report, type the following Report_Page event procedure:

Private Sub Report_Page()

Me.DrawWidth = 25 ' pixels Me.Line (0, 0)-(Me.ScaleWidth, _ Me.ScaleHeight), vbRed, B

End Sub

2. Open the rptCustomers report and type your criteria. Notice that when the report appears on the screen, a thick red border surrounds the pages (see Figure 25-2).

Part IV

AU Customers

CtaÊmor C'empsxr CONSICCIJBJUS ID Jfiuaê

Coyarr: zif ASäress

(Mir

R^im ßbrsüCoä,

fr«*,.

P&OKÎ

XV

ALF Kl AJtedi Fulleiklf * Malartiderf

Calei Peprerenl 0 bere C*. ä

Bertin

12209

Germar

030-007 +

03000765

AM.'.TP Analfiilo Brcaeda .¿nalhlllo

Owner .Awda. de la Cent IIlicI

Mfidco D.F.

OSOI21

Merfoo

(S 555+7

.5-555-37

ANTO H Antonio Moreno "TSque Anlorlo Mcrere

Owner Maladefo* 2312

MedC-j D.F.

05023

Merfoo

(S 55539

ARO UT Ar and lie Han Tlioiinaf Marty

calei Ptpreienl 120 Harroer Oq.

London

IfllAI IDP

UK

(17I)S*

(171) 555-

EERGC Eeigkni: iriifcKBp CIkIi iw Berglind Order Aimlrl: ta Bergiurtägen 6

Uleä

&9SS22

Ow*den

0921-12 3

0S21-123

BLAUS BIomh Cw Dell.ale :: Htiu I.1<:-i

Calei Peprerenl Fallen t. 57

Mac! ¡ein

6S306

Germar

0621-06+

0621-0692

E LO H P Blcndel pi re (II: F ridi rtqi.it Ol ko.

MaFelrM [üu 2+,place Heber

Slaf boug

67000

Fran*

66 £0.15.

6660.153

BO LID BilMoCanlda prepa Main Ccfnmer

Owner C.' .*jaqil, ST

Madrid

26023

d>ah

(90 5552

(91)5559

¡■ü K -P Bonapp' Laurence Iftdlun

Owner I2,iue dei Boudier*

Maielle

13006

Fran*

9I.2+.45.

9I2+.+5+

BOT1M BoUom-Ddlar Mate If BtAe Ii Urtrtn

Arcouilng Mai 23 Tiawaien Blud.

Trawatfen

BC 12F SM+

Canada

CSD*) 555-

'ßO+j 555-

BSBB/ B'f Beueraget .lckxia Artwuli

Calei Peprereril Fa.nleroyOlrcut

EC25NT

UK

Cffl)»-

C A: TU C a: Mi C aïildai paa I PaHdoCftnptcn

Cale.- A^enl Ceitllo 333

1010

Aigen!«

(U 13555

(1) 135-+6

o BtTO c (ntO'nntriU Mocl FrandrcoOharig

Ma Fe Ii ■•> r.laia Clerraide Granada^

Mt.ko D.F.

05022

Med®

(S 55533

(Q 555-72

C HO PS C hcp-ftity CNnete Yang Won

Owner HaM>bt.23

3012

Owltertaid

0+52-076

COMMI C cmirdo Mnelo Pedro A.fcnto

Calei Ajfociale Au.do« ü.iadai,23

CÄ: Palo

SP 05+320+3

Bradl

CID 55-7

COHSH Cavcldaled HcUlrpr Btd>e Ii Breun

Calei Peprerenl Bert.Hey Gaden:

London

WKI6LT

UK

(17 1) 555-

(171) 555-

D P AI D Dradienfcld Delltale i Sven 0 lieb

Order Admlntf taWatoeiwtg 21

Aachen

520B6

Germar

02+ 1-039

02+I-039+

D UMO H Dumonde enler Jartie Labiuie

Owner 67, rue dei cinquante

Nailei

+4000

France

406766.

4067696

issifägi JQQ4

*sge2cf;

Figure 25.2: You can frame your Access report pages with a thick red line by implementing the Report_Page event procedure as shown in Hands-On 25-6.

0 0

Post a comment