Вы находитесь на странице: 1из 753

Microsoft

SQL, VBA


SQL Server

Microsoft

-
-
2004
681.3.06
32.973.26-018.2
42
. ., . .
42 Microsoft Access 2003. - .: -, 2004. -
752 .: .
ISBN 5-94157-405-3
-
. -
, , , ,
,
Visual Basic . -
,
. .

Microsoft SQL Server , Web-
.
-
-
.

681.3.06
32.973.26-018.2


.
.




.

No 02429 or 24.07.00. 23.07.04.


'. . . . . 60,63,
5000 . Na 835
"-". 190005, -, ., 29.
, NB 77.99.02.953..001537.03.02
13.03.2002 . .

" "
190005, -, ., 29.

ISBN 5-941 57-405-3 . ., . ., 2004


, "-", 2004

II

I. MICROSOFT ACCESS 5
1. Access 7
Microsoft Access 7
7
10
11
11
14
Access 15
17
19
Access 2U
21
Access 22
27
28
29
31
Access 32
Access SQL Server 34
- 35
Microsoft Access 37
Access 37
Access 38
38
39
39
43
43
43
44
Access 46

2. 5(1
50
- 52
53
5.5
IV ^


56

" " 59
71
71
73
- 75
76

3. 81
Access 84
87
88
89
93
" " 94
1
95
101
103
" " 304
OLE 106
107
109
Access 116
" " 117
117
118
120
121
123
125
128
133
133
134

4. 137
137
139
140
141
142
143
144

144
145
146
148
150
153
154
154
155
Sum 155
Count 159
160
SQL 162
SQL 164
165
166
167
167
168
SQL 169
172
173
175
176
...177
186
187
187
,
189
191
193
195
197
,
198
,
199
2(11
201
201
203
, 203
204
207
VI

5. 212
212
/ 212
214
, 215
225
226
226
229
230
231
231
231
233
234
235
235
236
236
236

236

243
244
245
248
253
254
256
259
259
259
260

6. ,
266
267
26S
269

272
272
273
273
VII

276
276
278
278
280
281
287
288
, 289
291
292

7. . 30(1
301
301
302
304
306
30S
309
310
310
310
314

8. 32(1
320
321
321
32'2
322
323
324
326
326
328
330
33 3
333
33 J
335
336
337
340
VIII

341
343
344
346
347
350
353

II. 359

9. Access 361
Access 363
364
365
370
370
373
, 374
375
, 376
377
377
378
379
380

10. Access SQL- 384


Microsoft SQL Server 384
Microsoft SQL Server 2000 Desktop Engine 386
SQL 388
Access SQL Server ODBC 390
ODBC 391
393
393
SQL SQL- 399
SQL 400
SQL 400
SQL 402
SQL- 404
404
409
SQL- Access 411
Access SQL- 412
/

. Access Microsoft SQL Server 416


Access 2000 416
OLE DB 417
Access 419
,, 421
423
Access Microsoft SQL Server 2000
Desktop Engine 425
428
Access SQL- 433
SQL- 434
.-'. 434
43')
442
448
450
451

12. 457
Web-, Access 45S
Web- 459
Web- 460
Web- 460
Web- 465
Web- 466
Web- 467
Web- 469
Web- HTX/IDC 469
Web- ASP 47-!
Web- , 474
476
477
47S
479
481
481
482
482
48>J
497
502
506
507

: 507
Web- 50S
X

III. 511

13. 513

14. 518
520
-. 520
521
521
522
522
523
524
524

526
527
527
-. 528
528
529
531
532
532
533
, 535
535
536
536
537
, 537
541
544
548
551

15. Visual Basic 554


VBA 556
-. 558
Access 558
560
ADO 562
VBA 564
566
XI

568
- 568
- 570
VBA 571
572
572
573
574
, 575
576
577
579
580
GoTo 5
Call. 5SI
If...Then...Else 581
DoLoop 583
DoCmd. 584
VBA 585
VBA 586
586
588
589
589
591
594
595
595
VBA 596
, 596
, 599
601
,
605
607
608
609
...613

614

615
621
624
SQL 627
628
XII

16. 638
640
640
642
643
644
648
651
Access 652
653
657

658

17. 661
661
662
662
, 662
- 663
664
666
667
667
667
..668
669
670
670
- 674
676
676
- 678
679
679
681
682
684
"- " 686
686
687
688
690
692


() 694
" "
696
"" 697
; 700

"" 701
703
- ,..., 705
"- " 708
. 70S
, 708

711
1.
" " 713
713
71.5
- 716

2.
" " 718
718
719
- 720

721

Access
, -
.
, -

.
-
.
,
. -
-
.

. -
-
, . -
. ,
-

.

--
.
,
. -
.
-
- -
.

, , - . Access -
-
.

, -
, -
. Access
_2

, -
,

.
: ,
,
. -
,
, .
Access -
,
.
-
Access Web-,

.
.
.
: -
, ,
: , , , .
-
Access 2003 -
-
, .
, -
, -
. -
"-", -
-
. Access
SQL-.
Access Web- -
Web-; ,
Web- -
, Web-,

.
,
VBA,
.
3


Access.
. -
.
, .
, -
Access, Access ,
. . , -
.
, Access ,
Access 2003. ,
.
Access 2003
,
, ,
Access Web-
, .
, , -
Access -
,
, . .
.
, .
, , , -
-
Access 2003.
I


MICROSOFT ACCESS
1
-^-

Access
Microsoft Access


( ) -
-
.

.
. -
() , . -
, .
( ) -
, -
. -

,
( ), -
SQL (Structured Query Language).

.
.
,
.
-
, , , .
-
.
8 I. Microsoft Access

-
.

.
-
. . , ,
,

, , -
, . .
Microsoft Access
, -
,
SQL-,
, . -
Access, , -
. -
, : , , .
, -
MDB-, ,
.
Access -
,
.


, .
,


.
-
Access :
;
"3 ,
,
;
;
, ,
;
1. Access

\ ,
;
,
;
: ,
, , -
.
-
SQL, - -
Microsoft Visual Basic for Applications (VBA).
VBA Microsoft Visual Basic, -
Visual Studio.
VBA Microsoft Office:
Access, Excel, FrontPage, Outlook, PowerPoint Word. ,
,
VBA ( ). VBA
Microsoft Office.
VBA
Microsoft Office, . VBA
Access, -
"-", Microsoft SQL Server, Oracle . -
ODBC- (Open
Database Connectivity )
(Component Object Model), -
OLE DB. VBA OLE DB -
ActiveX (ADO).
, -
Access, -
Microsoft Jet. Microsoft Jet 4.0 -
.
Jet 4.0 -
Unicode,
. Unicode
, , Unicode.
Microsoft Jet Microsoft SQL Server
SQL SQL 92
Microsoft Jet 4.0 SQL.
Access ,
:
"-" Access -
, SQL
Server.
10 I. Microsoft Access

OLE DB Microsoft Jet. -



Access -
. -
Access. "-
" Access .

, -

. ,
Microsoft Office Microsoft SQL Server Desktop Engine (
Microsoft Data Engine, MSDE), -
, Microsoft SQL Server 2000,
, .
-
"-" , .
~3 -
.
-
. -
Access
Web- Access SQL-.
Web-
-
-
. Access
, Access -
.



Microsoft Internet Explorer 5.01 -
SP2, Microsoft Internet Explorer 5. 5
.
Internet Explorer 5. 5 -
-
.


Access 2003 Microsoft Office 2003 (
Professional, Professional with FrontPage, Professional Special Edition Developer).
Access 2002 -
Pentium III 128 RAM, -
1. Access

Windows XP . Windows XP -
-
Windows; Office 2003 -
,
Office 2003. -
Windows 2000 3,
Windows ME, 98 NT, Microsoft Office 2003
.
, Access 2003
, Pentium 233
64 . -
Office 2003 -
.
Office 2003 Professional Professional Special
Edition 250 ,
115 , . -

. , Windows 2000/XP,
50
. -
Office
.
Super VGA (800x600).
256 . -
Office 2003 CD-ROM.



-

, ,
.

, ,
-
.
, -
, .
, ^
. -
12 I. Microsoft Access^

. , -
, ,
. -
, -
.
-
-
, .
.
.
, ,
. . -
.
, .
-
.
()
() .
.
.
.

.
.
-
.
-
~~ (1:1) --
(1:). 1:1 , -
. 1: ,
,
.
, 1:,
,
"", . ,
"" ,
, -
. ,
. 1.1 -
, 1: -
()
1. Access 13

.
, .

001 778957651111 ,
002 789889*98798
004 456575675677 -
005
006
:
: : ^
1 1 1-1
111
1 1
01.01.2004 135400,00
1 1 1C .11

1: T1DD1 222 29.02.2004 773 024,00-


!,^ 001 777 14.05.2004 250 000,00

01.01 2004 75 160,00
- 002 555 12.01.2003
:

. 1.1.


.
-
.
,
. (, , .) -
,
, .
-
.
Access 2000, , -
.
. -
-
.
. .
. ,
, (. 1.2), --,
-
,
. I. Microsoft Access

: EBB
*
1 778957651111 .

+ 111 01.01.2004 1 135400,00.
* .
222 29.02 2004 77 024 ,00.
i 777 14.06.2004 250000,00.
L*_ 0,00.
002 789809798798

:
01.01.2004 75 160 ,00
555 12.01.2003 1 2 000, 00
'
88 23.05.2004 30 000, OQp. J
-
999 12.09.2004 450000,00.
.
*
004 456575675(577 -
005 77124357822 -
006 587879879123 ,
: LJ! 1 > ]H|t* 3

. 1.2.


Access -
. -
: ,
.
, -
- , -

.
-
,
.
, ,
,
.
, , -
, , ,
.
1. Access 75

,
, .

Access
Access -
mdb :
, , ,
;
D , , , , -
.
,
, , -
, . -
, . -
,
.

. -
, -
, . -
, Visual Basic for
Applications (VBA), .
, -
, .
,
VBA, .
Access.
.
(Tables)

. () ().

. -
.
Access 32 768 ( ,
. .). 2048 .
dBase, FoxPro, Paradox -
, "-", Microsoft
SQL Server, , Excel Lotus 1/2/3. -
16 I. Microsoft Access

,
Access.
(Queries).
. -
. ,
, -
.
. -
SQL -
. , -
,
.
(Relationships) ,
,
, -
, .
Access,
.
Access | (Tools Relationships).
(Forms) -
. -
, -
.
.
, , , .
. -
, ,
. .
(Reports)
, ,
. , -
.
.
(Data Access Pages) Web-
,
, ,
.
(Macro) , -
, -
. -
.

1. Access

, -
.
(Modules) Visual Basic for Applications.
-, -,

, . -
,
,
.
Access
.
.
Access -
(shortcuts),
.


,
,
(. 1.3). -
.

* : - " *"
* :
2004
" : ' '
: !

111
+ -

222
+-
" ; "
* + , -1
' '7 ~
.+ - .. + -.' - ; + :-'
", "! " ": " "
CD-ROM Panasonic IDE 24 16 : 40
DIMM64MPC100 i " 5 5 1 1
FDD3j5 15 15 15
HDD Maxtor 20GB ",-, 8 8 3 11
' Genius Liv ~"in 10 10 3 3 13
17LG ! 12 13 4 4 23
' ]| 1 10 11 12 12 23

. 1..

, ,
I. Microsoft Access

-

( ), ( ,
() ( ).
-
. -
, , , -
. ,

. ' -
.

, -
(. 1.4).

-
2004"""
"

CD-ROW
DIMM 64M HDD Maxtor 3e K.spra
Panasonic FDD 3,5
PCI 00 20GB Genius Liv 1TLG
IDE

'

. 1.4.

, ,

Access , , ,
, -
;
, -
1. Access ^^^ /9

, Microsoft
Internet Explorer 5.1 SP2 .
,
,
, .
Access ,
SQL; Access , , SQL -
.
-
OLAP (OnLine Analytic Processing),
Microsoft OLAP Service SQL Server.


, Access: , ,
, , , -
MDB. -
.

.
Access , -
.

MDE, ADE.
VBA , , -
, , ,
. ADE
, , -
. -
| [ MDE-.

Access -
, ,
. -
, , -
.
Access, , -
MSDE, -
, SQL-, .
adp .
SQL-
.
20 /^ Microsoft Access

Access
Access Microsoft Windows
, -
. Access
- -
. Microsoft Office
, -
.
Access, Microsoft Office,
, -
. (New Fi]e)
, ,
(Search File)
, (Clipboard)
.
Access ,

. ,
. Access -
.

, .
Access HTML,
. -
Access, -
, .
Access 2002,
, .
-
.

.
. ,
,
.
(), -
, Access 2003 -.
Access 2003 - , -
,
-. -
1. Access

-
, , -.
, , ,
, - -
Outlook Express. -
Outlook .
Access -.
-, Microsoft -
, .
Microsoft Office 2003 Microsoft Office . -
,
Windows XP Windows Windows XP/2000.
Drag and Drop -
. ,

.
. -

- .

. Microsoft Access. -
Access , ,
Microsoft Word Microsoft Excel.
. -
Microsoft Excel
Microsoft Access.
OLE ,
.
Access IntelliSense, -
-
-
. (Office
Assistant) -
, ,
Access.


Access -
,
, SQL -
Microsoft Visual Basic for Applications.
22_ I. Microsoft Access

: , -
, , : , ,
-
, (Design). -
, -
. ,
, -
.
Access , , -
,
-
.
, , ,
- .
Access -
.
,
, , , , , -
. ,
( ) -
, . -

.
-
(Name AntoCorrect) (General), -
) (Tools|Options).

Access
Access
, , , ;
.
(Wizard), -
.
(Lookup Wizard) -
-
.



(Lookup Wizard). -
]
(lnsert|Lookup Column).
1. Access

-
, -
.
(Crosstab Query Wizard) -
, -
, , -
-- , ,
.
-
. -
,
, -
. -.
SQL, , -
.

( ). - -
.

T001

17|_6
[1 000,00.

15



COJ

: M

. 1.5. ,

(Chart Wizard) -
, .
. 1.5 ,
-
24 I. Microsoft Access
/

. [
, , -
.


. -
] (Conditional
Formatting). , , ,
.
, -
, -
| (AutoFormat).
(Command Button Wizard Page Command Button Wizard)

. -
, .

VBA. , Visual
Basic,
.
(Switchboard Manager) -
, -
-
.
(Table Analyzer Wizard) -
.
,
.
| (Tools Analyze)
:
(Performance), -
-
-
;
(Documenter),
-
Word.
(PivotTable Wizard) Access 2002/2003 -
, ,
.
1. Access 25

( | -
| (File Get External Data|Import))
, -
.
Access, Excel, Lotus, Paradox, dBase
. HTML-
Microsoft Access. -
, ,
XML Access, Microsoft SQL Server Microsoft SQL
Server Desktop Engine. XML -
Access. XML
.
( | |
(File Get External Data Link Tables)) ,
, ,
, , -
.

. ,
- . -
, :
. ,
,
.
( | (File|Export)) -
( )
Access, Access,
. ,
, -
. , -
Access ( -
mdb), , , ,
Access (
adp) XML- ,
.
XSL. -
XML
, -
.
(Label Wizard)
-
. -
.
26 I. Microsoft Access

(User-Level Security Wizard)


.
, , -
, , -
. -
.
(Database Splitter Wizard) -
, ,
, , , -
. , ,
, , , -
, ,
.
SQL Server (Upsizing Wizard)
Access ( mdb) Microsoft SQL
Server Access (
adp).
.
SQL-,
Access.
. , -
, ,
. -
,
.
Microsoft SQL Server (Microsoft SQL Server
Database Wizard) Microsoft- Access
SQL- .
(Database Utilities) (Convert
Database)
( Access To Current Access Database
Version). ,
( Access To Prior Access
Database Version).
Access 2003 Access 2000/2002
.
Microsoft Access 2002/2003 Microsoft Access 2003.
Access 2003 Access 2000. -
|,
(Other) -
Access.
1. Access 27

(Database Utilities)
(Compact and Repair Database)
- .
-
,
.
. , , -
Access , ,
.


, -
. -
.

. -
.
Access , -
, , -
.
..
, -
, (New) Access, -
(New file)
. (Database) (. 1.6)
. -
, Web- Microsoft Office,
Office Online.
, , -
,
. .
-
, . -

, ,
Access. , -
,
, .
, , ,
. , -
26 I. Microsoft Access

, , -
, .

-i

Office Online

. 1.6.


-
, ,
Access .
, -
, -
. -

.
Access \.
, , ,
, , -
, . ,
,
: ,
.
1. Access 29

,
. -


.
Access
- Visual Basic for
Applications (VBA) 6.4, -
. VBA , -
, .
VBA (,
, , . .), , -
. -

. -
VBA , -
.
VBA :
VBA, , -
, , . -
Microsoft Office, Visual
Basic, .
Office
.
, VBA,
, VBA, Visual Basic -
-
. VBA -
Visual Basic .
.
Access VBA.
VBA,
VBA.



Access OLE (Object Linking and Embedding
),
. OLE -
-
. -
30 I. Microsoft Access

, , .
- -
, .
,
. ,
.
-
Windows: , , , -
. , , -
, ,
: , , ,
- . . , Access .
.
Access -
.
Access, dBase, Paradox, Oracle Microsoft SQL Sewer,
Microsoft Excel, Lotus 1/2/3, HTML
XML, , -
, , Microsoft Exchange.
-
.
ODBC (Open Database Connectivity), -
, , , OLE DB, -

, COM. OLE DB
,
, ,
.
ODBC ,
Access, -
. , ,
, -
Access.
Microsoft SQL Server Access , -
, -
.
Microsoft Jet OLE DB.
-
Access. Access
.
1. Access 3i


(Intranet)
, "-
".
(. 1.7). -
,
, .
Internet

Access

Internet Explorer

. 1.7. SQL- Web-

Access , -
, -
SQL Server.
Access.

Web-, , -

. -
,
Access SQL Server.
32_ /. Microsoft Access

Access XML -
XML-.
, -
Web- -
- XML Extensible Markup Language) XSL (Extensible
Stylesheet Language).
, ,
Web, .

Access
, , , -
. Access


.
, -

, . .
.
Windows 9* Windows NT/2000/XP.
. -
, , Access
, .
Access , -
,
.
.
,
.
-
. Microsoft
Windows NT/2000/XP NetWare Novell. Windows NT/2000/XP
Windows NT/2000/XP Server,
, Windows NT/2000/XP Workstation
Professional,
, Access.

.
, ,
, , , -
.
1. Access 33

Access -
-
.
. -
-
.
-
Access
, -
. Access
.

(Open databases using record level locking) ( -
|| - ToolsOptionsjAdvanced). -
, -
.
, ,
, Access -
. -
Access,
. ,
, ,
. -
,
. -
Microsoft Jet .

|) (Tools]ReplicationjCreate
Replica). Access
.
-
. ,
,
, .
-
, -
(Synchronize Now).
-
, .
' , -
(Resolve Conflicts).
.
.
34 I. Microsoft Access

. -
.

Access SQL Server


-
15 . -

"-". -
- ,
-
, ,
.

Access . -
, ,
SQL Server (. . 1.7). , -
, . -
-
SQL (Stinctured Query Language).
: SQL Server Microsoft, Oracle
Server Oracle NetWare SQL Novell. SQL-
.
Microsoft Access SQL
ODBC. ODBC (Open Database
Connectivity) -
SQL.
ODBC. MS Access
ODBC MS SQL Server Oracle SQL Server.
SQL

. Access, Excel, FoxPro
, ODBC,
SQL- .
Access , -
, .
SQL-, -
-
. -
, .
, -
SQL-cepuepa.
.
1. Access __ _______ _ 35

Access -,
, ,
, , SQL-. -
-
(, , , -
) , SQL-
. Access, SQL-, -
, Microsoft Jet, :;;
Microsoft SQL Server OLE DB.
Access OLE DB
SQL Server, Access, -
.
Access 2002/2003 SQL Server Microsoft SQL
Server Desktop Engine { MSDE), ,
SQL Server, -
, . -
-
. MSDE , SQL
Server. MSDE
SQL-. -
,
, -
SQL-.

,
SQL-. ,
SQL- -
.


MSDE - Microsoft Office 2(]03,
Microsoft Windows 98,
Microsoft Windows 2000/XP . MSDE -
SQL Server Service Manager.
MSDE MSSQLSen/er.
Start/Continue -
MSDE. SQL Server Service Manager
Auto-
start service when OS starts.

-
-
, -
36 I. Microsoft Access

- (. . 1.7).
-, .
Access 2003 - , -
Web- .
Access Web-
, Jet SQL Server.
-
,
.
, Access -
, . -
Web-,
.
, Access, -
,
.
.
, -
,
Internet Explorer.
, -
HTML- Web-.
,
. -
Web-, -
.

-
. -
XML (Extensible Markup Language)
. HTML, -
, -
. HTML Web-
, XML -
. XML ,
. XML -
. -
XML -
.
Microsoft Access XML, a
,
XML.
1. Access -

XML ,
Web. XML
, XSL
.

Microsoft Access
Access
Access
Windows 98/ME/
NT/2000/XP Access.

Access
|)1

' ' '| -

- -

f-J

."'- Office Online


-
.Microsoft Office OnSne

Access

: " "


_,1
._ _
. m db
nO_2002.mdb
5ystemi.mdw

. 1.8. Microsoft Access


/. Microsoft Access

Access,
. , , :
Windows XP
, . -
, , Microsoft Access
. Microsoft Access -
, . -
Microsoft Access,
, . 1.8.
Access -
Windows. . ,
Microsoft Access, .
. -
( ).
, , 1.9.

. 1.9. Access

Access .

Access
Access.


(. . 1.7) , -
- Microsoft Access , -
.
(Minimize) (l~J) Access,
Access -
Windows (. 1.10).

. 1.10. Windows
1. Access 39

Access ,
, .
(Maximize) () -
.
(Close) (I2SJI) .
Access .
(Maximize)
(Restore) (1),
, .

, <11>+<>
<Alt>+<>.
, .
, .


,
, -
. Access. -
, -
. Access
. Access -
,
.


-, -
. -
, , ,
.

, -
Access.
,
, . -
,
. ,
.
Access ,
-
I. Microsoft Access

. Access -
. ,
Access (. . 1.8) (Database).
, ,
. ,
, , -
, . -
(. 1.11), .

- ,.. Ctrl+N
- .., . , . Ctrl+0

Ctrl+5

,.,

... F7

Ctrl+C

CtH+V


V Office

Alt+Shift+Fl t

AIM-ENTER

...

: Microsoft Office Access Ft

,..
-
. , .

. 1.11.
1. Access 41

, -
(Add or Remove
Buttons).
(. 1.11). -
.
.

,
.

| (View|Toolbars).
(Customize)
, (Toolbars) -
Access,
(. 1.12). -
.

:
..
-
"


"
"
"
~
"
"
?
"
"
"
"

. 1.12.

-

.
I, Microsoft Access


(Commands) (. 1.13). , -
.
. , -
, ,
Access. , , -
, , .

.

,
.
: :

2MMWHM -'- -
^
* i^j' 3
. , , .
.;
I

i
-
_* - Office, . ,
<
.^ , ;

* 1 ...

. 1.13.

,
,
. (Modify Selection) -
, -
. -
.
, , , -
, . .
1. Access 43


-
, (Customize) (Options) -
(Show
Screen Tips on toolbars).

Access
,
.


Access , -
Microsoft Office, , .
.
Access (. . 1.8).


,
| (ToolsjOptions). (View)
.

Access : ,
Access, , . , -
, .
.
, ,
.


,
, , . -
(Ready) , Access -
. , , -
<Caps Lock>, <Num Lock>, <ScrollLock>
.



, , -
. -
. -
, .
' I. Microsoft Access


Microsoft Access -
, -
, \
(. . 1.8).
,
. , .
, ,
.
| (FilejOpen)
(Open) .
. 1.14.

. 1.14. Access


.
1. Access 45

, Access, ,
, - < >:
(Database) .
Access ,
.

(Objects), Access:
(Tables), (Queries), (Forms), (Reports),
(Pages), (Macros), (Modules). , -
(Groups). (Groups) -
(Favorites). -
.
.
.
(Favorites)
(New Groups), -
, ,
(Add to Group) , -
. , -
.
.

. , , -

.
:
(Open), , -
, , (Preview), -
, (Run), ;
G (Design) -
;
(New)
.


.

. , -
, .
46 ' I. Microsoft Access

(. . 1.14)
(Database).
Access ,
.

Access
Access
.
Access, -
Microsoft Office Windows, -
.
. -
, -
.
,
. -
,
. , . . -
.
.
. -
,
, Web- www.Microsoft.com.

Access |: Microsoft Access Fl
(HelpjMicrosoft Access Help Fl). -
Access. -
.
.
-
.
. -
,
(. 1.15).
,
Access Web- Microsoft Office
Online. Web- , ,
, , , -
.

Office.
1. Access '

2050 ,
-
.

: _

"~ .I_-*jiV !
Access

or ,
(&


Access ^ *
*(
,
, ^ " i
-1^' Access
, >i>i
^ Microsoft Access
,
, ^
^
. -/' Microsoft Access
, , ^ Microsoft
: f
, :
,
?
, ,
. -;#?
^
Vf ,

-$'
.
> Microsoft Access
k
!>
)
^
*

. 1.15.

Web- -
, , -
, , .
, -
Office.
48 I. Microsoft Access

, -
, -
Access Web- Microsoft Office Online.
,
.
-
. , ,
, -
. ,
.
,
.
Access
.

, , . 1.16.
. , -
.


Office. ^

.


?
* ,
;
,

. 1.16.

Access.
, -
, -
. -
, ,
.
1. Access 49


1.
Access?
2. ?
3. ?
4. -
?
5.
?
6. ?
7. ?
8. ?

1. .
2.
.
3. .
4. .
5. .
6. .
7. .
8. -
.
2


Access .
.

. -
,
.
(),
, . ,
, -
.
, ,
1:. -
Access -
.



-
,
, -

. ,
- .
,
, .
-
().
-
,
2. 5,7

.
.

. ( )
, , -
,

, . () -
.
. ,
, , -
. , -
Access

.
Access ,
. 2.1.


RP

:




ml]
If

RP

1 1 1 I I l"'"l ' 1
/
' * ' -'JJ







(~| Access
0
1 . ..!_.. 1.. 1 _ _ f i l l
- Access


3 CIJ.:X.I 1 1 1

. .


Access

Access
1-"| Access


-
I- i

/ /

. 2.1. Access
3 . 835
52 I. Microsoft Access


-
(), -
, --
(1:).


, -
-
. -
, . ,
, -
, .

Access. -
, .
-
,
.
, -

, ,
. -
, -
.
Access
,
.
,
, .
,
,
Access, -
.

-

- ()
() -
. ,
2.

.
.


-
: , , -
. -
,
. : , -
, , , , , , , ,
. .
-
. , -
. -

, . . ()
. ,
-
. .
. , -
, -
.
. -
-
.
-
() :
() .
-

. , -
, -
, . . ( ), , -
, . . ( ).
, , -
, . . -
. , -
.
,
, -
, -
54 I. Microsoft Access

.
.

( ), . . +
+ , . . ,
. -
,
( ), . 2.1.

2.1.



-




1 1 1 )
2 1 1 20

( "~~ ^

(, ),
, -
.


-
.
. 2.2. _ ( ) -
, + ( ) +
( ) .

+ +

. 2.2.

^ 55

.
, -
:
-
;
, . .
;
, , -
;

, . . -
, -
-
, ;
-
, . . .

(~ ^

-
.

-

,
-
,
.



, -
, -
() . -
, -
. -
- , , ,
, - .
-
.
56 I. Microsoft Access

-
.

. -
.
-

, , -
, , ,
. ,
.
, -
.
-
, .

.
.

. -
.



:
;
"3 .
-
, -
-
.
. - -
, , , ,
, , . . -
. -
;
,
, -
(, . .) .
2.

- -:
- ()
( , -
);
- ,
, ( -
, ).
, - -
, - -
, ;
] ()
.
. -
-
, .
()
-
.
-
.
, ,
. . .

, ()
().
. -
, -
. " "
(. 2.3),
.

KODT
NAIM
CENA
EI

. 2.3,
" "
58 I. Microsoft Access


-
, . -

.
,
, -
.
1. -
.
-
. ( ),
-
. , ,
(), ,
. . -
-
(,
, ). - -
(, ) -
.
(, ,
. .), , -
. -
-
(),
( -
).
-

.
2. -
-
, . . ( ),
.
-
,
. 2.2.
2.

2.2.

,
()






,

3. , .
-
-
. , -
.
-
. -

.

.
-
.


, -
, , -
-- (M:N). ,
- .


-
, -
, .


" "

" ".
/. Microsoft Access


, -

.
, ,
, -
.
:
;
();
, ;
;
3 - .
-
.
" ",
" ", " ". . 2.4, 2.5, 2.6 -
.

. 2.4. " , '


/, /

. 2.5. " "


2.

.
.

. 2.6. " "

. -
. 2.7.

h 9

" " 200 .


. .




- . -

()

. 2.7.

- ()

(. 2.8).
, -
,
/ -
.
62 I. Microsoft Access


_200_ .


, _ ,

-:

200

_ .

. 2.8.

,
,
, .


, -
, ( ).
, ,
:
, . .
,
. -
, ,
.
.
" ", -
, . 2.9. -
.
2. S3


, . -
, (HAHMJTOB),
(), () , .
-
(_). , _ .

, , -
.



_
_

, 2.9.


, . .
, . .

.
(_).
-
. (_,
, ,
, , , , . -
-



.

. 2.3.
I. Microsoft Access

2.3.



TOE -




_




_
_

_

" ". -
" -
", (. . 2.9). -
-- .
(__), (_),
(_) (_), -
. ,
(_) . , -
-
, . . , -
.
.


^ _ , -
-
, .


" " . 2.10.
, _
. ,
2.

. _
_ _. ,
-
.

_
*
_

. _

. 2.10.

, -
, .
,
_, ,
(), _. -
() _
_. _
__ . .
. 2.4.

2.4.
" "

() ,

_ _

__ _

_ __

_ _


66 I. Microsoft Access

, -
,
.
" "
. 2.5.

2.5.
" "


^
_

_
_
_
_


, " "
.
, , -
,
.


"".
"",
(. 2.11). .

"".
.
.
: , -
( ,
) , ,

2.

. -
.

""


_
_

_
_

_
_

_

*~ -
_ -
_
^
. 2.11. "'

-
, , , , , . -
, -
, ,
.
, -
, .
-
. ( ) ,
, . .
.
, -
.


, -
, , , ,
.

, ,
.
68 I. Microsoft Access

, ,
. - -
, , ,

,
.
,
. , -
, .
+ .
,
,
, . . , -
-
+ + (. . 2.11).
"". -
, ,
, .
-
. , ,

(). "" -
. 2.6.

2.6.
""



_


_

_
_ _

_



2. 69

"".
. -
.
, (. .
). -
-
+ .
.( ) -.
, ,
( -
+ ).
.
,
.
, . , -
, . . -
. , ', -
' "" .
'-
' .
' .-
-
, .
( ),
, -
. ,
- .
'' ' . ( -
) ' ,
..'


, ,
-
. ( ),
( ), ( -
).
, , , -
, , -
.

-
. , -
70 I. Microsoft Access

, . . -
, .
,
.


, -
, , , -
,
.

, , ,
,
.
- ()
-
. -
,
-
. ,
[] -
+ -f .
. 2.12
.

""

_
_
_
_
_
_
_
*-
_

. 2.12.
2. 71

. -
, , -
, . -

. , -
,
(). -
. 2.7.

2.7.
""


()
_ _

_
_
__
_ _
_
_


-
.
. , , -
, ,
. ,
.
, ,
, , , . .


:
- (1:1);
- (1:);
- (M:N).
I. Microsoft Access

- ,
() (), -
, ()
(). ,
, -
,
, . . -
. -
. 2.13. - : -
, . .

1:1

. 2.13.
-

- (1:) ,
()
(), () -
().
- . 2.14.

1:

. 2.14.
-

, , . .
. -
- : -
, , . .
- (M:N) , -
() -
(), , ()
().
M:N . 2.15.
. 3

'N
- '

. 2.15.
-

-
. , -
, -
"".
- . , -
- -
(. 2.16).

:N

Kb
1
1 :

. 2.16. :
-

- , -
(. . 2.16).
-
-, ,
. - -
, . . , -
- .
- -
, ,
.



-
, , .
" ".
74_ I. Microsoft Access

- -
(1:), . .
, -
.
, -
, -
1:.
- ,
(). -
""
, ,
^, . -
- ~~
_,
, .
"" ,
- .
-> _.
- ,
( )
,
( ).
> , -
- .
-* -
-, -
,
.
, _ -
- - ,
- - -
(. 2.17).
. 2.8 -
-
.

2.8.


1 ;
1:
2. 75

2.8 ()

M:N

\ /

\ /
N

. 2.17. -

-

. 2.18 - -
, -
.
- , -
. -
, .
,
-
, --
.
I. Microsoft Access

i
, -
, .
, .
.

.

. 2.18. -
" "



Access
-
. -
.
:

, ()
<^2. 77

. -
. () ,
. () -
.
-
.
1: .

, , (,
).
,
- -
" " 1:. -
,
(_),
(. . 2.6).
_ -
, -
_ (. . 2.6). -

.
-
(_),
(. . 2.7).
_ -
(_),
__
(. . 2.6).

-- _ + _,
(. . 2.7).
Access , -
. -

. -
- .
(. . 2.18), ,
Access . 2.19.

, ,
.
.
7 I. - Microsoft Access


- _
. _

_
_


' 1 _
1 _ -
_


_ .
-
- _

_ 1

. 2.19.
" "


1. ?
2. ?
3. ?
4.
?
5. ?.
6. , -
, ?
7. , ,
, ?
8. , ,
, -
?
2. 79

9. ?
10. ,
?
. .
12.
?
13. .
14. - ()
1:. ?
15. ?
16. - -
?
17. - --
?
18.
?

19. ""?
20. , --
?
21. ,
?
22. , -
?
23.
?

1. , , .
2. -
, , -
.
3. , .
4. -
() .
5. ,
, -
Access.
80 /. Microsoft Access

6. .
7. .
8. .
9. _ .
10. .:
11. ;
; -
^ ; -
, ,
.
12. .
13. -, -, -.
14. .
15. , -
.
16. .
17. "".
18. .
19- .
20. , ,
, .
21. .
22. , .
23. .


-
3


Access -
, -
. -
.
, . --
,
-- --. --
-
,
, .
, 2.
-
. -
. -
, . Access
.
, -
Access .
-
, -

.
, . .
.
. -
/, -
. (
. 5, 6) ,
.

82 4acTbJ. Microsoft Access

6.
.


-
,
. ,

.

Microsoft Access
(. . 1.7 /). -
.
,
. .

^
Access
| (ToolsjOptions), (View) -

.

|
(File)New) (New) (ill)
(Database).
(New) : -
, ,
.
(New Database)
.
(Data Access Page)
Web- -
. -
, , -
Microsoft Access Microsoft SQL Server no
.
Microsoft Access.
,
. -
, -
(Pages) ,
. ,
3. 83

, -
, ,
.

Access.
.
-
Microsoft Internet Explorer 5.01 SP2
. Access Office Developer Edition
.
Project (Existing Database) -
Project (New Database) -
, ,
SQL-.

. Microsoft SQL Server
11.

.

j (

[
~
-

. , . , , . (, (
)

Office Online

. 3.1.

4 . 835
84 J^ Microsoft Access^

, -
( ) Web-
Microsoft Office Online (www.Microsoft.com). ,
. -
(. 3.1).
(General)
. (Blank Database)
-
. .
,
.


Access
Access ,
. , -
.

(New Database).
(File New Database) (. 3.2) -
(Save in) ,
, , , "
TOBapOB.mdb", (Create).
< >: (Database).


, Access, MS Office, -
(My Documents). -
-
] (Tools|Options)
(General) (Default Database
Folder) , -
. | (Tools|Options) -
.

, ,
255 , , Microsoft Windows 98/
NT 4.0 215 , , Microsoft Windows 2000/XP
Millennium Edition. -
: \, / , - , : * , ? , " , < , > , |.
3.

Microsoft Access
(*.mdb) (Microsoft Access Databases),
, mdb. -
Windows
Access.


; ] _-J - ,jj ' ^ _j . tl < *

_2003,^ jj J f !


s
* ~4
'j;:;'|

flfp 1

:|

.'"} ;: j

( fed - is *

.

; . mdb
1
; Microsoft Office Access (*.mdb) *

. 3.2.


Windows
. ,
Windows
| -
.


(File New Database) , -
(. . 3.2). -
(File of
type) Microsoft Access (*.mdb) (Microsoft
Access Databases).
86 I. Microsoft Access

(File New
Database) , -
. UES -
. -
(Up One Level)
. -
(Views)
. (Tools) -
,
. , -
.
,
, , .
< >: (Database) (. 3.3)
< > -
(File New Database) (. . 3.2).

: ( Access 2002 - 2003)



'^. | X 1

. 3.3. " "


{ )

(Objects)
, :
, , , , , .
3. 87

. -
"
Microsoft Access" 1.


.
: , ,
, , , ,
.
.
(. . 3.3)
(Tables) (New).
(New Table) -
(. 3.4). ( ) ,

(. . 3.3). -
, .

. 3.4.

(Create table in Design


View) (Design View)
(New Table) -
, -
.
.
I. Microsoft Access



!:
(TableI: Table),
(. 3.5).

SB ! :
- )
_




OL








,
.

F1.


IME
IME
-

. 3.5.

,
-
(Table Design) (. 3.6).


, -
, -
Access. -
() .
3.

[ *
\ [:
.' ,., ^ | ^J. Ctrl+S
4
r-'J^, .,,
v" Jj

. L
,., F7
-' /* Ctrl+X
v [^J Ctrl+C
v .^" Ctrl+V
1
Iv i,J^<;.i
/ PJ i;
! -^ | J - :-:. P.'."- IK.ilV

^ \'&
v *^

\ -s -- -i-t TI rifiMi

01 ! Alt+ENTER
^ !;3! ...
' ^3 F1 1
v J -. jj;
^^^ : Microsoft Office Access Fl
?
I Cfipoc

. 3.6.


(Table) (. . 3.5) -
(Field Name), (Data Type), (Description) -

(Field Properties). (General)
, , , -
, (. . 3.5).
(Lookup) (Display Control):
, .
9 I. Microsoft Access


(Field Name).
, Access. -
, , , -
".", "!",
"[ ]".
ASCII 00 31.
64 .
(Data Type). ,
, ,
. Access -
.
(. . 3.5).
, Access,
.
" ".
Access : " ,
Microsoft Access (MDB)" " (MDB)".


(General)
. -
(. . 3.5).
, -
.
(Field Size) , -
. 1
255 ( 50 ). -
:
(Byte) 0 255, 1 ;
(Integer) -32 768 32 767, 2 ;
(Long Integer) -2 147 483 648
2 147 483 647, 4 ;
(Single) 3,438
3,438 7 , 4 ;
(Double) -1,797 10308
1,797308 15 , 8 ;
(Decimal) 1038 1 1038 1
( ,
adp) -1028 1 1028 - 1 ( mdb)
28 , 12 ;
3.

(Replication ID). -
(Globally unique identifier, GUID), 16 .
Access
, , ,
.
:
(Long Integer) 4 ;
(Replication ID) 16 .
,
, . .
-
.
, -
,
.
(Format)
, -
.
Access
(Number), / (Date/Time),
(Yes/No) (Currency). -
,
Microsoft Windows. -
, -
OLE, .


(Format).
(DecimalPlaces) -
.
0 15. ( (Auto))
(Format). ,
,
(Format) (General
Namber). (DecimalPlaces) -
, ,
.
(FieldSize).
(Caption) , ,
, .
92 I. Microsoft Access

G (DefaultValue) ,
. -
, = N O W ( ) ,
. -
, , .
(DefaultValue) -
. 255 . -
(AutoNumber)
OLE (OLE Object).
(ValidationRule)
, , -
,
(ValidationText).
(ValidationText) , -
,
(ValidationRule).


, -
, .

.


(DisplayControl) -
(Lookup) (. . 3.5).
,
(Text Box), (List Box)
(Combo Box).
(List Box)
(Combo Box), (Lookup) -
,
.
, ,
.


(Lookup
Wizard), (Lookup) -
.
3. 93



() , .
, -
, .
, ,
Null. ,
Access Null
. ,
( 10). ,
, (Table Design) -
(Primary Key)
) (Edit Primary Key).
.
, . -
: <...> (Indexes: <...>) (. 3.7) -
(Indexes) -
) (View)Indexes).

f : [5]
1 I

j PrimaryKeyJ _
KCVLCK
_
"'


,
j

. 3.7.

. 3.7 ,
PrimaryKey, (Field Name) ,
. -
.


-
Access .
, .
94 I, Microsoft Access

, -
, .
,

, . -
, ,
. 32
.

-
(AutoNumber).
-
( 1) . -
.
. 4 -
, J6 . -
.
. -
, Access
. Access
(AutoNumber).


" "

2 "
".
, Access
,
(New Database). (File
New Database) , , -
" .mdb" (. .-3.2).
(. . 3.3)
: ( Access 2002 2003).

" " -

(. . 2.3, 2.5, 2.6, 2.7 2),
, -
, . 3.1.
3. 95


-
. (. . 3.3) -
(Tables) (New). (New
Table) (. . 3.4) (Design View).
,
(Create table in Design View) pa
.
. 3.1 -
, -
!: (. . 3.8) (Field Name)
(Data Type).

^ j
-
. 15 -
4 . 8 .

(General) :
(Field Size):
_ , ,
(Single);
,
;
(Format):
(Currency).
Microsoft
Windows : 123 456 789,00 ;
_ .
_,
,
100 .
, , 15%, 7,5%;
(DecimalPlaces) - 2,
_ 0;
(Caption), (ValidationRule),
(Validation-Text) -
, . 3.1.
I. Microsoft Access

3.1.

- -
- .


__ - 5

TOE - 25 -

- - 2

- 8

- - -
-




OLE

~)
_ : >-, 05
And <=0, 35 : " >=5% <=35%".
; >=0 And <=35000
: " >=0 <:=35 000".

, , -
.
(. 3.9). -
(ValidationRule). -
(. . 3.8).


<; > < -
. . -
.

OK Access
-
(ValidationRule).
3. 97

:
_[ |
^





V

|
[
'
0 :

.

0

>=0,OSAnd <=0,35
.
>-5 % <=35%
>

- F1.

. 3.8.

. 3.9.

. _, -
,
(Primary Key).
98 t. Microsoft Access

.
. 3.1.
-
. { (File|Save)
(Save). -
(Save As) ! (. 3.10).

. 3.10.

, -
.
(Tables) -
: .
, -
.
, , -
(View)
(. . 3.6)
(. 3.11).

. 3.11.

1.
, , , ,
, _. -
(. 1).
3. 99

, ,
, , , _ " ".

OLE
, -
, Paint
bmp.
OLE (OLE Object). -

. Access -
. .
.


OLE (Object Linking and Embedding )
Windows.
OLE , -
. -
, ,
.
, , -
, (WAV), MIDI {--
), (FLI, ),
(AVI), , -
. Access, OLE, -
Microsoft.

. -
, ,
, .
. -
.
.
. -
,
. -
, , , -
, , .
,
.
^f
MEMO
, -
.
MEMO (Memo).
100 I. Microsoft Access

-
, <Shift>+<F2>.

, , Microsoft Word, ,
OLE (OLE Object).

.


(Hyperlink) -
.
(Hyperlink)
Access , -
Microsoft Office -
, Web- -
.
,
.
( _
).


() -
_ _.
, -
<Ctrl>, -
(Primary Key).

_.

/
-
_. /.
,
. -
.



_ . ,
( , )
, , , -
3. 101

. ,
00.00.0000, 00->L<LL-
0000. "" , -
0 9 . -
"9" .
"L"
Z. ">" "<"
. -
-
, .
: -
(999)000-0099, .
. -
5 7. 9 ,
,
.



, -
.
-
(Datasheet View). -
(Open)
(. . 3.3).
(View)
(. . 3.6) ) (ViewjDatasheet).
-
(Table Datasheet), . 3.12.

, . -
, . . -
(Admin) -
.
-
|| (Tools|Security|User And Group Permissions).

, .
| (Records|Data Entry)
102 I. Microsoft Access

.
( (Records|Remove Filter/Sort).


,37. .# *

.., * haJi Ctrl+S

v | -^ ,,-

,., F7

+
CW+C
Ctrl+V
CtH+Z
,., CW+K





... Ctrl+F
Ctrl++

QKHO F1I


^: Microsoft Office Access Fl
.,.

'--
...
,..

. 3.12.

, -
, , -
3. 103

. -
.
Access , -
. ,
, , Access
. -
, , , -
. , -
.

. , -

-
. -

.


-
. , ,
, , , ,
, .
, , -
. -

.
. -
(Format) -
( ) (Formatting (Datasheet)),
.

:
.
, .
.
;
.
, ,
.
, ;
104 I. Microsoft Access

. ,
;
.
.
, . -

( );
, , ,
-
(Format);
(
(File|Save Layout) -
" '< >'
(Do you want to save changes to the layout of table < >1).

" "
. -
:
(Open). (Datasheet
View). () (. 3.13) -
().
, - 2.

:
[ [ ]
031 ; 17LG 6587,. 5%;
002 FDD 3,5 363,00. 20%:
:
003 HDDMax1or20GB 2590,00. 10%:
MiniTower 916,00.
CD-ROM Panasonic IDE 1 153,00. 1
DIMM64MPC10Q 360,00.
EPSON ST.A4 2432,00.
2 338,00.
. Genius Liv 789,00.
Genius ext 1 295,00. .
' 00. "
10 |>#1 10

, ,

. 3.13.
3. 105

( ,
,
) . -
.
,
<Esc> ] .
<>
. -
( ) -
<Esc> | / (Edit|
Undo Current Field/Record).
-
( ). -
()
, | (Edit Undo Saved
Record).


(Undo) , -
. -
,
. -
.

, -
(*).
-
|] (Edit|Go To|New Record) -
(New Record)
(Table Dataslieet). -
.



, , ,
.


] (Records Save Record).

(Delete Record) -
| (Edit|Delete Record). -
Access -
106 I. Microsoft Access

. -
.
-
. Access
. ,
. ,
. -
-
/ (Undo Typing). -
)
(Records|Save Record).

OLE
OLE
. Paint
bmp.
.
(CMI . 3.13).
] (Insert|Object). (. 3.14)
(Create from File).

Microsoft Office Access


: OK
* 1

j
I Microsoft Excel
; "
, Microsoft PowerPoint
1
Microsoft Word
Paintbrush
!_ Microsoft PowerPoint

'
Paintbrush'.

. 3.14.

(. 3.15) .
(Browse), -
,
.
3. 107

Microsoft Office Access


:
*** ;E;\Documents and Settings\NVP\MoK |!

(*
" g

- -


,

. 3.15.


(Link) , ,
.
. -
.
(Link).
, .

. 3.13, ,
.

.
,
, (Insert Object) -
(Display As Icon).
.



_.
_ -- , .
_ - -
.
.
. ,
, -
I. Microsoft Access

. -
, -
, -
.
_
,
( ) .
,
.

(. 3.16).

; _
08.01.2003 001
222
_ :
444 _ CPOKJIOCT | _ | _
555

:

. 3.16. _

-
(Tile Horizontally) (Tile Vertically)
(Windows).

)
, . " -
", ,

. -

, .
3. 109




. -
-
.
.
_ _ ( )
, . -
_ (. . 3.5). -
_ (Data Type),
(Lookup Wizard). -
(Create Lookup) -
,
(. 3.17).

,
.
? 9

( |0 " "
| ,
*~ .

. 3.17.

, -
(. 3.18).
,
(. 3.19).
110 I. Microsoft Access


,
.

;
;
;
: _
:
;
; -'

<

. 3.18. ,



?
" ".

; :


_
_

< I >

. 3.19. ,


. . -
3. 111

, ,
(. 3.20).

_ :

J? ^
1_
7'
MHHJTOCT
"
:


5ELECT ,_ FROM ;
1
1

2., 54
8
2,54

. 3.20. , ,

_
, _,
(. 3.21). -
_.
__ ,
.
(. . 3.20)
, ,
, .
, . 3.22. -
, ,
.
,
, .
112 I. Microsoft Access

KQflJQB | _ _ | _
111 100
111 20
"
111 10 ~50

001 1 10 100
TQ01 2 4 12
TQ03 2 5 10
004 3 15 30
0 0 0
1C

. 3.21.

Microsoft Office Access

, .

. 3.22.

.
_ _ ( ) .
,
_ (Data Type),
(Lookup Wizard).
_ ,
, , : _
( ) _ ( ). , ,
,
(). . 3.23.
() -
, . -

(. 3.24).
3.

to _ :

_
_ !
CPOKJTpCT

KOJTJIOCT .
_

1


SELECT ._, 0 , JOB FR<
1
2

; 3,836
8
3,836

. 3.23. ,

Microsoft Office Access

6 'Microsoft Office Access'


" " (Limit To List) "".
"
, " " (ColumnWtdths),
,

" ", " ".

. 3.24.

-
,_
__ ( ),
. . 3.25 , _ -

.
114 I. Microsoft Access

: ffi
_
111 17LG 1 10 100
111 17LG 2 . 5 20
111 17LG 3 ! 5 " 30
111 FDD 3,5 1 10 50
111 FDD 3,5 3 5 10
222 17LG 1 10 100
222 17LG 2 4 12
222 HDD Max!or20GB 2 5 10
222 MiniTower 3 15 30
> L U-ROM Panasonic IDEl 1 10' 40
HDD Maxtor20GE 0 0 0
MiniTower
; J4 | f | ( I Al
DIMM64MPC100
EPSON ST.A4

. Genius Liv
Genius ext v

. 3.25. _

,
,
,
, .



, , , -
.
(Relationships),
(Show All).

, -
-
. " "
(. . 2.19) -
. -
.
Access,

. , ,
3. 175

(Relationships) (Forms). , -
,
.

2.
-
, ,
.


1. Access?
2. ?
3. ?
4. ?
5.
?
6. ?
7. ?
8. ?
9. ?
10. -
?
11. ?
12. ?
13.
?

14. ?
15. .
16. ?
17.
OLE?
-', **.;
" i f . f l -S

t. .mdb.
2. , , , , , .
3. -
.
5 . 835
176 I. Microsoft Access

4. , , .
5. .
6. .
7. .
8. PrimaryKey.
9. ()
().
10. .
11. .
12. Her.
13. .
14. .
15. , , , -
, .
16. .
17. | (Insert(Object).

Access
, -
, -
, - .
, , -
.
-
, -
.
-
(. . 2.19),
Access. -
, -
.

, . ,
-
. -
.
3. 117

-
, , , -
-
.


" "
,
" ",
2.
: (Database) | -
. (Tools Relationships) (Relationships.)
, ) , -
, .


(Show Table) (. 3.26) -
(Tables) , (Add),
(Relationships) "
", (Show Table). -
(Close).
(Relationships)
(. . 3.30).
.

] |

!


i

. 3.26.
118 \. Microsoft Access



-
, - .
( ).
() -
,
. - -
. - -
, -
, , ,
.
.
, --.
,
I:M, _, -
. , , -
.
-
, , Access
-- . -
- (One-To-Many) (Edit Rela-
tionships) (Relationship Type) (. 3.27).

.
/: /;

( |

:

.,. ]

(. ,
rJ7

: --

. 3.27.
3. 119

)
,
Access -- -
,
1: 1:1.

3.

" ": > (
_), -> _1 ( _), >
( __), -^ _ ( _), >
( ).



, .

. -
-> , ^
+ _. ,
<Ctrl>,
.

(Edit Relationships) (. 3.28)


, /
(Table/Query), ,
/ (Related Table/Query).

/; /


_
.. ; IKO/LCK! .

..

j " 1-. .

: --

. 3.28.
120 I. Microsoft Access


1:1
1:,
.
, Access -
-
:
-
;
,
;
,
,
.

-
Access -
. Access
, -
.

:
,
;
Access;

.
" "
(Edit Relationships)
(Enforce Referential Integrity). -
,
.
. ,

, -
, . 3.29.
3. 121

Microsoft Office ACCESS

] 'Microsoft Office Access'


.

'' .
, , .

, ,
, .

. 3.29.


,
-
/ , .
, . .

, .


. -
,
.

Access -
.
(Edit Relationships) (. . 3.27)
(Cascade Update Related
Fields) (Cascade Delete Related
Records)
.

. -
-
Windows . . 3.30 -
" ",
, -
2 (. . 2.18).
722 I. Microsoft Access

. 3.30. " "

. 3.30 " ",


1, .. , --
( )
.

4.
,
,
, -
,
. , -
, -
.

. -
. _ ( -
) . , -
, ,
_. , . .
(Cascade Update
Related Fields) (. . 3.27). ,
. -

.
3. 123

_
, , ,
, . .
,
.
. ,
-
_, .
. ,
-
, . .
(Cascade Delete Related Records).
, , , -
,,
.


, , , -
: -
-
.
_ _. -
, -
. -
, .
--.
_ .
__ . -
_,
, . 3.31.
,
.
( ) _ -
, --, -
, _ -
(. 3.32).
(. . 3.32),
,
_ = 001, 002, ..., 005.
, .
I. Microsoft Access



FDD
HDDM

CD-RO
DIMME


/

. 3.31.

JM
& ? :
| ] ] |
001 17LG 6587,00. 111 1 100
001 17LG 597 ,00. 111 2 20
001 17LG 6587,00. !1 11 3 30
TG02 . FDD 3,5 363,00. 111 1; 50
TD02 FDD 3,5 363,00. 111 3 10
TD01 17LG 57,. 222 1 ' 100
_01 17LG 6587,00. 222 2 12
_ HDD Maxtor20GB 2590,00. 222 2 10
_7004 MiniTower 916,00. 222 3 30
V 005 CD-ROM Panasonic IDE 1 153,00. 40

* . J
: J < I to I>JM1>#| 10

. 3.32.

, , 008 -
-
.
_ -
, ,
3.

, ,
.

-
. :
1. ,
( ).
2. , -
, , -
, .
3. , -
, , -
, .

, -
1:1, 1: .


(Edit Relationships) (. . 3.28) 15-
. .
, -
(. 3.33). , -
.


f ii.] ,
.
2. ""
"_",
.
3, "_"
"",
.

. 3.33.

,
_, . 3.34.
: , -
.
126 I. Microsoft Access


<_
_ KO/LTOB
CPOKJIOCT

;_ _

_ JOT _ JOT
_06 _ _ _
_ CPOKJTOCT
_ _
_ _ _ _

2 3

. 3.34.


. 3.32, 3.35, 3.36.

)
( -
. 7),
. , -
.

(. . 3.35) , -
, , -
__. -
_, Null.
,
006, 007, ..., .

Null , ,
. Null,
. ,
(""), . Null -
-
. ,
. -
(""). -
Null .
3.

[
17LG 537,00. -111
17LG S 537,00. .111
17LG 6587,00. 111
17LG 6587.00.'222
17LG 6587,00. 222
FDD 3,5 363,00. ;111
: FDD 3,5 363,00. ;111
HDD Max1or20GB 2590.00. 222
MiniTower 916,00. .222
CD-ROM Panasonic IDE 1 153,00
DIMM64MPC100 360,00.
EPSON ST.A4 2 432,00.
2 338,00.
. Genius Liv 789,QOp
Genius ext 1 295,00p

|| 15

. 3.35.
_

(. 3.36) , -
, _,
.

& : | - || j X J
| [ -
001 17LG 6 587,00. 111 1 100
001 17LG 6 587 ,QQp. ; 2 20
TG01 17LG 6 57 ,QQp. 30
TVJ02 'FDD 3,5 363,00. 111 1 50
TD02 .FDD 3,5 363,00. 111 . 3.J... 10
.
001 17LG " ' 587,00. 222 100
17LG 587 ,00. 222 2 12
HDD Maxtor2QGB | 2590,00. 222 2 10
TD04 MiniTower 916,00. 222 30
TDQ5 CD-ROM Panasonic IDE I 1 153,00. 1 40
1 450
444 2 550:
.
*
: MJJ 11 12 >'1>*1 12

. 3.36.

128 I. Microsoft Access

,
Null. ,
15 16 -
.

( }
, > _
, _ -
, , .



Access
, .
, -
-
. , -
_,
_ ( ), _ -
_, . .
. -
_, _
( ).
, ,
"+" (. 3.37).
"+" , -
, . "+" ""
(). "- -" .
.
, -
, , -
( ,
).
,
)| (Formar|Subdatasheet|
Expand All) (Collapse All).
Access
.
3. -'

17LG 1 10 10D
17LG 2 _ 5, 2D
17LG 3 5 '
FDD 3,5 10' 50
FDD 3,5 "

222 0,00.
|
17LG
17LG i:
HDD Maxtor20GB
MiniTower I

: __). !

. 3.37.

Access ,
-- -
--,
.
"+"
(Subdatasheet).
(Insert Subdatasheet) (. 3.38), -
.
,
(Insert Subdatasheet)
, . -
_ -
, -
(. 3.39).
-
.
130 I. Microsoft Access

1
TTJ02

+ TOQ4

+ TD05
+
TDQE
+>
07
+
'008
* TD09
+ 7010
-
: ..H.LiJ
: ;_

: JOB

. 3.38.

Microsoft Office Access

'Microsoft: Office Access*


.

. 3.39.

, , ,
[ -
. (Subdatasheet Name)
, (Link Child Fields)
(Link Master Fields) (
) (. 3.40).
, -
(Subdatasheet
Name) , .
(Subdatasheet Name)
(Auto), , -
, Access
"+" .
3. 131


!
, , , . .
. . .
, . .
, .

..-, ,
, _
_
_
, , , .

. . . .;

. 3.40.

:
]
01 .. : , 15
| *- ,1
- 001 25.01.2004 111

001 10
TD05 20
008 1
0
*|2 29.04.2004 222
+ ' 28.04.2004
+ HOQ4 25.05.2004 222
+ 005 10.03.2004 222
; 30.01.2004 1
-f ' " . . ,29
03 .. , 38
| *- J} j
- 001 25.03.2004 111

004
TD06 5
"*" _ :
* 26.03.2004
*' D3 ' 20.01.2004 111
30.01.2004 1 :
> *
IHi : JlLl 4 ' J ^]
<\ vllri
. 3.41.
132 I. Microsoft Access

,
, "+" -
. -
.
, -
, (None). -
(None)
|| (Formar|Subdatasheet|Remove) -
.
, :

. . 3.41
.

:
]
- 01 ..
[ ^ |
-.HD01 25.01.2004 111
\
- 001
|_
_^_ * 17LG| 6587,00. 5%
*_ 0,00
- TQ05~ 20 ^
{ |
+ CD-ROM Panasonic IDE ; 1 153,00. . 30%.

- TD08

__ * 2338,00.
0,00
*

002 29.04.2004 22
28.04.2004
004 25.05.2004 222
005 10.03.2004 222

:
.. .,29
! ' | 1

. 3.42.
' 3. __ 733

, -
, , ,
.
, , -
,
, -
(. 3.42).

5.
?.



, ,
.



, .
, , , -
, . -
. ,
, -
. ,
.
, .
, ,
-
. ,
. -
,
,
(. 3.43).
.
-
(. 3.44).
, , ,
.

(Primary Key) -
134-' I. Microsoft Access

(Indexes), -
. ,
, -
, . 3.45.

Microsoft Office Access

ReldSee ,
.
?

. 3.43.

Microsoft Office Access

'_' 'Microsoft Office Access1


\ .

11111 |

. 3.44.

Miciosoft Office Access

\
*\
bw
^
^




- ,
. , ,
, , .

. 3.45.

, -
, .



: , , -
.
3. /35

, ,
. , -
,
.
, -
,
.

. | (Tools)Relationships)
(Relationships) -
. (Relationship).

(Show Table) (Relationship).
(Show Table) (. . 3.26)
(Add).

. -
| (Edit (Delete) <Del>.
, -
, , -
, (Delete
Relationship). -
| (Edit (Delete) <Del>.
-
, | (Relationships]
Edit Relationship) .


1. Access?
2. ,
?
3. ,
-
?
4.
, ,
?
5. , -
-
?
136 I. Microsoft Access

6. -
,
?
7. "+" ?
8. -
?
9. , -
"+"?

1. .
-
.
, .
2. 1: 1:1.
3. ( ) .
4. .
5. .
6. .
7. .
8. ] (Insert] Subdatasheet).
9. (Subdatasheet Name).
4

,
.
, -
. ,
, , . -

. ,
.
. ,
, , -
. -
. .

,
.
,
, . -
, ,
. , . -
-
.



,
.
, , ,
.
, .
138 I. Microsoft Access

:

;
, ;
;
,
, -
;
G ;
,
;
;
.


. ,
- , -
, -
. ,
, -
. -

. -
: , -
.
(. . " Access" 3).

, .
Access :
-
. , -
. -
.



, . ,
. -
, -
.
4. /39

-
, , , -
.
G , , -
, .


-
Access.

, .

.
. ,
, .

.

.
, , , -
. , ,
, .
-
.
.
. .
.
.

(Query Datasheet) (. 4.1) , ,
(Table Datasheet) (.
. 3.12 3).


^ : ! -J!
1 *.
* ?i 'I X> VB / ;I 4A
, / _t-M ;
J I - --
,,^-,;._ - -
--=> -

. 4.1.

, , -
, , ,
140 I. Microsoft Access

.
,
. , , ,
, -

. ,
, -
.



(Query
Design) (. 4.2). ,
.

si| ,,. :>jj[ Ctrl+s


"
00,1 ...
;*- X II

pjrf^z^""*^-^^.^!
"^5J|
|_
?

... F7

! CtH+X
In"
[yj -jj ! Ctrl+C
_jf ..,
.^ CCH+V
i.-**?;-
^ |||1|
l?f ,.,
! / ^
">|'=
j]
? .
v1 '^_j ...

-
|
|

/ _^ Alt+ENTER

- .{N , . ,
. 1 - F1 1
v ;-JM|

^ 1 : Microsoft Office Access Fl


i J '"' 7 ........_

. 4.2.
4. 141


,
.


(Database)
(Queries) (New). -
{New Query) (. 4.3) (Design View).

Ey
l
$ \


\
;
. I

. 4.3.

,
(Queries) -
(Create query in Design view).
(Show Table) (. 4.4) -

(Add). (Close).
- 3anpoc</V>
(Query</V>): (Select Query) (. 4.5).
. -
, -
. ., -
, .
. I. Microsoft Access

| \


!
1
'-


!

. 4.4.

ts- :

:
;
:
; ; I ! '
:
:

. 4.5.


-
, . -
4. 143

, (*), -
. ,
Access ,
,
.
, Access ,
, -
.
. -
. -
, .

. -
, -
.
,
(. . "-
Access" 3).

(~ j
, Microsoft Access
, ,
, . .
. 10 , 4, -
40 (10x4). -
.


.
-
.
.
, -
. -
, , ,
.
( ) -
:
(Field) , aaripbctf:
(Sort) ^-
;
144 I. jWicrosoft Access^

G (Show) ,
;
(Criteria) ;
(or) ,

, ,
. (Table
Name) , |
(ViewjTable Names) -
.


,
. ,
, -
, ,
Access.
-
:
(Field) -
. -
, ;
\ -
;
;
3
"*" ()
.



| (QueryjShow Table)
(Query Design)
(. . 4.2). -
, .
-
, , ,
.
.
4. 145

-
. -
, , ,
(. . 4.5).
<Delete> | (EditjDelete
Columns).

. ,
, -
.



(Criteria) (. . 4.5).
, -
.
: , -
, ().
, Access ,
. ,
, . -
, "ft" ( (') ANSI-
92). : 567, "", #1--2004# ('1- -2004 '
ANSI-92).
,
Access, , (True), (False), Null.

,
. -
, , . . .
, Access .

,
.
, , , , -
, ,
.
: [ ] ! [ ] , D e f a u l t V a l u e -
:
F o r m s ! [ ] ! [ ] . D e f a u l t V a l u e .
146 I. Microsoft Access

, -
, : = , < , > , < > , < = ,
>=, Between, In , L i k e , And, Or, N o t .

.
,
= .
,
, .
, .
(*) -
(?) (ANSI-89) (%) (_)
(ANSI-92).
Between -
. :
Between And loo 10 100;
Between # o i . o i . i 9 9 7 # And # 3 1 . 1 2 . 2 0 # ( ANSI-92
"#" (')).
'
, . :
In("";""; " ")

Like ,
. :
Like "* " (ANSI-89) L i k e "^" (ANSI-92)

AND, OR, . , -
, "", -
"".
-
AND OR . NOT
.
<Enter> Access -
.



.
, , 1000 .
10%, , 2500 .
(_), ()
(_>.
4. 147


(Queries)
(Create query in Design view).
< >:
(Select Query)
<...> (Show Table <...>) (. . 4.4).
(Add). -

(. . 4.6). (Show Table).

1? ? ; L ||C i X l


_
08


_

v
1
< >
: _ _ "
: ^
:
: 0 0 0
: <1000 <=0,1
: >2500

< ->: ""

. 4.6.


<Delete>.
() .
(. . 4.6) -
_, , _
(Field).
,
. ,

6 . 835
148 ^ I. Microsoft Access

, ,
. , <Delete>.
(Show) , -
.
, . 4.6.
, ,
AND. , , -
OR.
,
(Run) (View).
,
.
, (Save)
"!". , -
, .
]3 (FilejClose)
(Close). -
, (Open).




. -
.
. -
.
-
. -
.
(Field).
, <Enter>
,
(Exprw), N ~ , -
. ,
, . :
!: []*[],
.
4. 49

! -
. .
, , ,
.

. Access VBA 150 .
.
.
.
(, , ); , Date -
, Month () , -
, 1 12 -
, . .thName ( [; ; )
, -
(=) (=) -
. , MonthNamet [_]; ) -
. (-
).
.
. , , Format,
(
, ) .
Format([; [; __[; -
__] ] ] ) . ,
.
. 4.1.

4.1.


dddd
ddd
dd
ww
mmmm
mm
mmm


150 _ I. Microsoft Access

:
Format ( [] ! [_] ; "mmrtm" ) 6
;
Format ( [] ! [_] ; "mm") .


,
Format , "\". -
, Format { [] ! [_] ; 'mmmrn\ yyyy' ) -
. .

.
,
.
.
,
.
. Excel -
, ,
. .
. -
, , , , -
.
-
(Expression Builder), -
(Build) .
.


, ,
.
__ / (Date/Time).

(Field), :
^(!_) , ;
MonthMame (Month ( !_) )
Format { [] ! [_] ; "mmmm") ,
.
4. 151

Month .
MonthName . Format -
.
, , -
3, . 4.7. ,
, -
, . 4.8.

_
_
_

-
HOMJHAKn ([}!{ ])

0 0 0
3
-
<

^
. 4.7.

1
: (*([]![_]))
;
:
: 0 0 0
: ""
:
< >

. 4.8.

. 4.9 4.10 , ,

.
152 I. Microsoft Access

[*?JP^
Month (number) | OK

+ -1 /|*1 &| =| >] <|<>] And| Or j Not JLike] (| )] j

(3 ; i<Bce> A; IsDate :
' ' j Minute
Forms I
~ ^ i MonthName
Now
Q J Second
;Titne
L i **" Time$
/^,,.. ,- Timer
v | TimeSerial
< >s ^ Time Value

4onth(number)

. 4.9.

[?][

Month ( []![_] ) OK

+j - j /j*f&| =|>|<1<>| And] Or | Not JLike | ({ j] ] ___ |

f^Tafinn.^, *. ; - ^

-D 1 ?
- D
- _
-D
-D -
<> &' i _ ^
4onth(stringeHpr)

. 4.10.


(Exprw). -
.
4.


!,
2 . .
.

(Exprw) .
,
, .

(Field
Properties),
(Properties). (Field Properties)
(General)
(Caption).


,
.
-
. -
, ,
.

(Criteria) .
(Enter Parameter
Value).
, (. . 4.7)
[ ],
(. 4.11), -
.

'|

. 4.11.
154 I. Microsoft Access

.
-
. -
,
. ,
-
, OR:
[ ] OR [ ].

, . -
, -
[ ?]
, . 4.12.

: ! - j[DJ[XJ

' ' ' " '1


_ :1
_ .
^

v-
V-

.<: ) g

: _ : []+[]*[ ?]/ 100 =-*S


:
:
: 0 0
:
:
< '! ,>!,
"-

. 4.12.


1
.


-
.
4. /55

Access :
sum ;
Avg ;
, Min , ;
count ;
stDev
;
var ;
First Last .
-
.




. ,
, , -
.
| (View|Tota!s)
-
(Totals). -
(Total) ( -
).
(Total), (Group By),
, -
(Group By) -
.
.

.

Sum
,
.
_.
I. Microsoft Access

. -
_ . -
.
_, sum -
, .
(Totals).
(Group By) __ sum.
. , . 4.13.

'0 ? :

HOMJOT
_

;
:
; 1i
;
;
;

. 4.13.

. 4.14.

$ ? : P]f6][x]
Sum-
>_ 17LG 262
FDD 3,5 60
HDD Maxtor2QGB 10
MiniTower 30
CD:ROM Panasonic IDE 40
; H | ^ | j i ' > [^ "| 5

. 4.14.

4. 157

_ ,
_, . ,
_ .
_ ,
3, .

Sum - _ .
, -
_ . -
(Properties). (Field
Properties) (Caption) .
. 4.15.

? : -

17LG_
FDD 3,5
HDD Maxtor20GB
MiniTower
CD-ROM Panasonic IDE
: 1 MM 5

. 4.15.

- " ".
, -
, _
_, (. 4.16,
. 4.17).
,
,
(. 4.18, 4.19).
reo I. Microsoft Access

" ". -
. 4.21.

'is* :.. .00


1-_
> 111 , 4
222 5
3
: JJLJ_j.J | 1 * | |^j 3

. 4.21.



, -
,
.
,
, . -
10 000 .

_ (Group By) sum.
_
(Group By) (where), 6 .
(Criteria) : >
(. 4.22).

: _ _ '*
:
: Count Sum


:
; 121 0
; MOQQQ
; |
< >

. 4.22. ,


4. ' :

, ,

10 000 . (. 4.23).

: .
^

. 4.23.


, , , , -
, -
, , : in
("111",-"") : > 000.


, ,
. , -
.
().
:
DMax(, , [_]}
, -
, , -
, .
.
DMin .
. 4.24 , , -
.
, " ".
DMaxf"[-_]";"
").
162 I. Microsoft Access

lir 3dnpoc13 :


: _ -_ Sum-
: i
:
: 0 0
: ("[5-_] ; " ")
:
<| > *

. 4.24. ,

1.
,
.

SQL
SQL (Structured Query Language) - ,
.
Access SQL,
Microsoft Jet.
,
SQL.
Access -
SQL, , SQL. -
SQL . -

SQL , -
Access.
,

SQL. , Access
SQL. ,
SQL
(RecordSource) (RowSource). -
^4.

,
.
Access SQL -
SQL:
G ANSI-89 SQL ( Microsoft Jet SQL ANSI SQL)
Jet SQL;
ANSI-89 1, ;
ANSI-92 SQL ,
;
ANSI-92 1, .

J
ANSI-92 SQL
Access 20022003.

Access , -
, -
, -
.
Microsoft
Access, Microsoft SQL Server,
, -
SQL Server, ANSI-92 SQL. ,
, -
ANSI-89 SQL.
Access 20022003
ANSI-89.
SQL ANSI-92 -
,
:
d ,
, Access
2002 2003;
CJ SQL
Server (ANSI-92) .
ANSI SQL.
ANSI-92 SQL SQL
Server (ANSI-92) . -
ANSI-89 SQL .
164 /. Microsoft Access


, -
, .

, ANSI SQL -
.

SQL
L. (. . 4.6)
"!".
2. SQL (View) -
. Access ,
, SQL (. 4.25).

is1 1 :
ISELECT ,_, ., . _
IFROM
IWHERE (((,)<) AND ((, )<-)) OR (((, ) >2soo))
ORDER BY . ;

. 4.25.
SQL

SELECT
.
FROM , -
,
WHERE ,
(. . 4.6).
ORDER BY ,
.
. -
.
1. , ,
, _.
2. SQL , SQL.
3. , SQL,
, SQL,
.
4. 165

4. , -
_.
5. ,

(. . 4.20, 4.21).
6. SQL. SQL
, . 4.26.

:
[SELECT ._, Count ( . ) AS [Count - ^ ]
IFROM
GROUP BY . _; V

. 4.26. Count
SQL

SELECT .
_, , , -
, count,
_. ,
count: __, -
.
, , *
, , -
, .
(Group By) , -
(_ -
) .




.
,
.
, ,
, . -
,
.
166 I. Microsoft Access

, -
,
, -
, -
. -
, .
-
.
-
, -
.
-
. , ,
.
, ,
.
(Queries)
(Create query
in Design view).


(Show Tabie) (. . 4.4) -
5 :
( _);
_ ( _) -
, ( _);
( ), -
__ ^.
(Show Table).
,
. _
. _
, , -

, (. 4.27).
-
. _ -
, , , ,
.
4. 167

* A.I * 0
* " 1 * :
_ : '
' I KO/LTOB 221 _
_ _
|_
_ v.| '_ _
_ ^
t,
.V'l

gj >'.

;
:
:
: D a
:
: V

<; 1

. 4.27.


,
, (Field): _
; _ ; _ __ -
_1.
,
. -
(Table Name) ,
] (View|Table Names)
.


,
- FDD 3,5. HDD Maxtor 20GB.
(Criteria) -
, _
"FDD 3,5" "HDD Maxtor ". HDD -
, "*". -
-
Like, .
, . 4.28.
/. Microsoft Access

KOfiJTOK *; _
_ KCVLTOB
_ . _
!. _

: HAMMJ10K TQ8 "


: ^ ;
;
; 0 0 0 0
; "FDD 3,5"
: Lite "HDD*" V

<; 1 >'*"

. 4.28.
FDD 3,5 HDD

,
(Run) (View). . 4.29.


1 FDD 3,5
3 FDD 3,5
2 :HDD Maxtor 2QGB

; 4 I.H ] 4

. 4.29.
FDD 3,5 HDD



, ,
.

, (
4. 169

).
,
--
, ,
.
_
, . ,
_ -
. _
, _ -
.
, , -
, ,
; -
.

.
: , ,
-
, .
" ".


SQL
, -
.
SQL, (View). -
SQL :
SELECT ._, J1J1AH\ _, . _,
_._
FROM INNER JOIN ( INNER JOIN ( INNER JOIN
_ ON ._ = _._) ON
._ = ._) ._ =
_._
WHERE (((.HAMM_TOB)="FDD 3,5" Or (.HAKMJTOB) Like "HDD*"));
FROM SELECT -
, ,
INNER JOIN , -
, : ON ._ = _._.
170 I. Microsoft Access

INNER JOIN -
, . ,
:
_ ,
, , .

- , - _ ^
, . 4.30.

1
:

m
KOflJTOK

_
; _
^ .
.
_
_
*_
WHJTOCT

. 4.30.

,
, , -
(. 4.31).
, , ,
,
Null.
, -
Null. -
, , . .
Null. Not Null,
,
.
SQL :
SELECT .__, JUIAH. J10CT, .__,
.
4. 171

FROM RIGHT JOIN ( LEFT JOIN ( LEFT JOIN


_ ON .^ = _._) ON
._ - ._) ON ._ =
. ;

|!
is* ; .. ; '
*
1 17LG 100
^_ 2 17LG 20
3 17LG 30
:
1 FDD 3,5 50
3 FDD 3,5 10
1 17LG 100
2 : 17LG 13 I
2 HDD Maxtor 20GB 10
3 MiniTower 30
1 : CD-ROM Panasonic IDE 40

'

TJ
: Hj^j J | 1 > ] |>#j 16 < jj

. 4.31.

LEFT JOIN -
, .
( ) ,
() .

, . -
RIGHT JOIN -
, .
( ) ,
() .

_.

, -
-
.
, -
. ,
. -
_
172 I. Microsoft Access

, ,
_.



. -
, . Access
-
.
_ -
(. 4.32),
. ,
:
[ ]
, -
:
[ ]

; HAWMJ1OK _ -*4;
:
:
: 0 1 0
; [ ]
: [ ] >
*...! JL

. 4.32. _

Access ,
. 4.33, -
.

[?JfXj

. 4,33.
4. 773

SQL. WHERE
:
WHERE (((. _} = [ ])) OR
(((. _) = [ ]));



, ,
.
,
, . -
, _ , ^ -
.
,
.
.


_ ,
_ sum. _
: Between #01.02.2004* And #20.02.2004*
(ANSI-89) Between '01.02.2004' And '20.02.2004' (ANSI-92). -
,
. 4.34.
. 4.35.
SQL. SELECT
:
SELECT ._, Sum(._) AS [-_]
FROM INNER JOIN ( INNER JOIN ON ._ =
._) ON (._ = ._) AND
(. ^ = . HOMJIAKTI)
WHERE (((._) Between #2/1/204# And # 2 / 2 0 / 2 0 0 4 * ) )
GROUP BY .HAHMJTOB
ORDER BY Sum (._) DESC;
SELECT ,
.
FROM , -
_,
, -
, .
174 I. Microsoft Access

_
_
_
V

; .
:
: .
:
; '
: Between #01.02,2004* And #20,02.2QCrt#

. 4.34.


-, ''-.
[DJ[XJ

| -._ |
CD-ROM Panasonic IDE
HDD Maxtor 2QGB
FDD 3.5
; 11 I 1 I I 3 3

. 4.35. ,

WHERE , -
. _ .
GROUP BY ,
_
.
Sum (. _)
, -_.
>>
ORDER BY ,
.
. -
() (._).
-
. -
4. 175

-
. " ". " ".



-
. ,
.
, ,

, ,
.
, . 4.36.

t- 1C :

. ^
s

_
_
_

: _ [ ]-[ ]*[] .""


:
;
: 0 1
: < >[_]*[]

<:. ) >'""

. 4.36.


(Criteria) _ ;
<>[_]*[]

,
.
, :
[]![].
176 I. Microsoft Access

,
, , :
[_(] - [_] * []
-
! .
. 4.37.

:
|^
; 17LG 3174,00. -10000,00?.
004 02 HDD Maxtor20GB 3590,00. .
004 01 33 380,00. 10 000,00.

I !*

. 4.37.


, ,
, . . -
.

SQL. SELECT
:
SELECT ._, ._, ._,
.__, [_]-[_]*[] A3
FROM T05AP INNER JOIN ON . __ = . _
WHERE ( { {. _) [__] * [] ) ) ;

SELECT ,
, , -
.





.
,
. -
4. 177

. -
.
, , -
,
- ,
.

,


. - , -
,
. 4.38.


,

1 1
1



,


2
2


1

. 4.38. - ,



,
.
, ,
,
.
178 I. Microsoft Access

HOCTABKAJTJIAH. -
, -
(. 4.39).

:
& : f lfwTlK7"i
[. |[|[|

.-
. *sl

_ |
MUIHJIOCT
^ !<
<

.
: Konjiocr *~
: _ d
: Sum
;
: 0 D 0
: < ]
: V

< >
. 4.39. ,


_. , -
() , -
.
, .
,
.
. -
, ,
, (. 4.40).
, , -
-,
. -
, -
, . -
.
,
, Month
4.

,
, -
.

_
/
_
_

: [_
;
; .
:
: ::
. : <=[ ]
;

. 4.40.


, .
, -
, -
, ,
. -
,
,
, ,
; , , -
(. 4.41).
, -
,
.
,
Null, -

Nz ( [-_] ) -Nz { [5-_] ) .
"".
7 835
180 I. Microsoft Access

0 :

: Sum- Sum- ; NZ([5utn-KQn_nOCT])-NZ([5um-KOn^OTrP])'


:
;
:
:
:

, 4.41.

NZ (,- [__!1]) , -
, Null -
, . ,
Null ,
"".
N u l l Null. ,
NZ.
(. 4.42)
. , -
, ,
.


-
, -
.

-_ Not Null,
, , -
.
,
, SQL.
4.

SELECT :
SELECT ._, . [-_] , . [5,~_] ,
([5-_])-2([1-_]) AS
FROM ( LEFT JOIN ON ._ = ._)
LEFT JOIN
ON . = . ;

: 19 ll
Sum- |Surn-KO;
17LG 262 14 243
FDD 3,5 60 60
-
HDD Maxtor 2QGB 10 12 -2
MiniTower 30 30
CD-ROM Panasonic IDE 40 30 10
DIMM64MPC100 " /" -

EPSON ST.A4 i 0
1 :
. Genius Liv 3' -3
Genius ext ]
_Hj < | | 10 -^ j I 1 J 10

. 4.42.

FROM , -
_ ( LEFT
JOIN ON ._ = . _). -
, -
, .

, _
. .
_ , . . -
.
-
, . 4.43. -
, . -
,
, --.
182 I. Microsoft Access

is1 !5 :


!
_
CPOKJTOCT
MMHJ10CT "
>
_
_ *


_
_
_
_

: !
:
; : :".
:
:
;
:

. 4.43. ,

2.
1. .
2. .
3. , ,
.
4. , -
.


1. ?
2. ?
3. ,
?
4. -
?
-4. 83

5. , -
?
6. -
?
7. , ?
8. ?
9.
?
10. ?
11. ?
12. -
?
13. ?
14. , ?
15.
(Total) , ?
16.
?
17. , , -
SQL?
18. SQL ?
19. SELECT ?
20. SQL , -
?
21. SQL ?
22. , SQL , -
?
23. SQL ,
?
24. SQL?
25. (*)
?

1. | Ta6flHuy(Query]Show Table) -
.
2. .
184 I. Microsoft Access

3. .
4. .
5. ().
6. =, <, >, <>, <=, > = , Between, In, Like, And, Or, Not.
7. (Open).
8. , .
9. .
10. .
11. (Caption) -
.
12. .
13. , .
14. .
15. (Where).
16. , -
.
17. (View) SQL.
18. SELECT.

19. .
20. FROM.

21. WHERE.

22. .
23. Group By.
24. .
25. .

1.
?
2. -
?
3.
?
4. 185

4. , 1:,
.
, 10. 10
.
, -
, , ?
5. , ,
?
6.
?
7. ,
?
8. ,
5 ?
9.
, ?
10. ?
11. , ,
, ?
12. ?
13. !, 2, ,
2, 2 !?
14.
SQL?
15. FROM
?
16. FROM -
?
17. FROM SELECT
?
18. ?

1. , , -
.
2. .
3. .
4. 10 12 .
fgg I. Microsoft Access

5. .
6. | (View|Table Names).
7. .
8. 25.
9. " " " ".
10. , .
11. .
12. .
13. , , .
14. FROM INNER JOIN, LEFT JOIN RIGHT JOIN.
15. .
16. .
17. .
18. ORDER BY.



-
. , , ,
.
, , -
.
, ,
.

-
(. . 4.20, 4.21).
-
. ,
(Query Type) -
(Make-Table Query) -
| (Query|Make Table). (Make
Table) " " (. 4.44).
, -
, (View). -
4. 187

, .
.


: |
<
:

. 4.44. ,

SQL. -
SELECT INTO
SELECT ._, Count[._)
AS [-_]
INTO [ ]
FROM
GROUP BY ._;

SELECT INTO SELECT ,


, , -
, INTO. -
SELECT , FROM.
GROUP BY,
. , -
( count).
GROUP BY WHERE,
, -
WHERE.



(Update Query). ,
.
188 I. Microsoft Access


(Update To).
(Update Query), -
(Select Query),

(Update Query) (Query Type) (. . 4.2) -
| (Query Update). -
(Update To).
. 4.45.

4 1 1
: R5
:
; []*[_]
: [ ]
: .

. 4.45.

, , ,
.
(Update To)
, .
.

i
, ,
, , -
4. 189

. -
.

] (Query Run) -

-
.
, -
. -
| (View)Datasheet View)
(View) . -
, -
.


, -
1:,
"".

SQL.
UPDATE :
UPDATE INNER JOIN
ON ._ = ._
SET ._ - [] _]
WHERE (((._)=[ ] ) ) ;

, ,
UPDATE. UPDATE -
SET ,_,
, []*[_]. -
, ,
WHERE.

,

, ,
, .
(. . 4.45) -
, -
.
.
190 I. Microsoft Access

,
, (. 4.46).

0 : L jiCifx]
*

*
_
_
KOAJOB
_
_
Mi
< ->,

: _ _ *"*
;
; Sum
;
; 0 0 0
;
: V

. 4.46. ,
,

,
: (_) (_).
,
. sum -
, .

;
,

[] * [_] , -
sum.
.

, -
sum, -
. -
.

. "
4. 91

". -
.

,
, . 4.47.
, : _
_. -
_, (Update To)
-_ , -
.

is1 :

_
_
5-



[5-_]

. 4.47.

, -

, -
.
, , -
(. . 4.45).


(Append Query)
. -

I I. Microsoft Access


.
, , -
. -
, , -
, .
,
.
.
.
-
.
(Append Query)
(Select Query) -
. -
(Append Query)
'! ... ]
(Query|Append Query).
(Append) (. 4.48).


/
: ^ V

{*
f :

. 4.48. ,

(Table Name)
, .

, (Current Database).
, ,
(Another Database) .
.
Access Microsoft FoxPro, Paradox, dBASE
SQL (. ).
4.

-
(Append To) (. . 4.49).


, -
. , -
" ", . -
, " " " "
, .

.
,
, . -

(. 4.49).
. ,
-
(Enforce Referential Integrity),
, -
.

1 :
-

_
_

_


_,

: < HJOP -1
: . . .
:
:
:
: V

< . \ >. _

. 4.49.
194 I. Microsoft Access

,
, .
_ _, _
.
(Append To) ,

.
.
, , -
, (Append To) .
,
, (View) .
,
, ' (Run)
. -
-
.
,
, . -
, -
.
Date ,
2 , -
.
SQL.
INSERT INTO :
INSERT INTO (_, __, _, _, __)
SELECT [ ]._, [ ]._, [
]., [ ]._, [ ].
FROM [ ];
INSERT INTO ,
.

, , -
. -
SELECT. -
.
4. 195

INSERT INTO :
INSERT INTO (_, _, _, _, _}
SELECT [ ]._, [ ]._, Date() AS
2, [ ]._, []*2 AS !
FROM [ ];

3.
-
.


, .
-
. ,
,
. -
,
, , -
.
, _,
, , . 4.50.

* 16 : [. [||]
.

. I

1
|_ ~~. JOT
_
CPOKJ1OCT
_
_
_

< >

_ *[_01 .^
1 I 8,


[ ] [ [ ]
1
<| >

. 4.50.

196 I. Microsoft Access

_.
_.
, , -
_, _.
_, _, _, _, _,
, ,
_, _ Month(_) -
.
,
_ ,
. -
,
,
. -

, __.
: __ + _ + _,
.
, -
, (View).
(Run).
SQL.
INSERT INTO :
INSERT INTO (_, _, _, _, _)

SELECT ._, ._, _._,


_1. _, _. _

FROM INNER JOIN _ ON ._ =


_1. _

WHERE ( ( (_._:) = [ ] -} AND


((_._)=[ ]) AND
( (Month([_])) = [ ] ) ) ;

INSERT INTO , -
. -
, SELECT.
,
, , SELECT,
.
4. 797


(Delete Query) -
,

(Cascade Delete Related Records).
(Delete Query)
(Select Query). ,
,
.
(Delete Query) (Delete
Query) -
| (Query|Delete Query).

(Delete) (. 4.51).
. ,
, -
(*) .
(Delete)
(From). ,
, -
. (Delete) -
(Where). (Criteria)
.

(View) . -
.
1 (Run) .
, .
-
.

-
.
-
, -
.
, --, -
,
(Cascade Delete Related Records), -

198 I. Microsoft Access

, . . -
, -
.
(Cascade Delete Related Records) , -
-
.

,

,
. " "

(Cascade Delete Related Records),
-
.
, , ,
. . , _,
.

. 4.51. , -
_ .
.

! 8 :

: _10
:
:
: ""

<', !
. 4.51.
4. 199

.

, , .

,

, , -
.
_!

(Cascade Delete Related Records), , -
, , ,
.
,
, -
, , ,
_. ,
-
, _, . . -
_.
_ . 4.52.


_ _
_ _
:_ .
.

V

: .* _ ^
:
:
: "" #04,04.2004#

1
<, -

. 4.52. _
200 I. Microsoft Access

_ -
. -
, _, -
.


, -
. ,
. 4.53, . -
, -
,
. ,
. -
,
.

: ,* KOAJTOK * "
:
: )
; "" #04.04.2004*
:
V,
<| !

. 4.53.

, . 4.52, -
SQL. -
DELETE :
DELETE _.*, ._ ._
FROM INNER JOIN __ ON . _ =
nOCTABKAJTJIAH._
WHERE (((._)="") AND {(._)=#4/4/2004#));

DELETE ,
, WHERE. FROM -
,
. , ,
, __*
(: _ . *). ,
, , , ,
, .
4. 201


-
Access. :
;
;
(
);
, .
, -
. -
-
.
.
-
(Queries) (New).
(New Query) -
: (Simple Query Wizard), (Crosstab
Query Wizard), (Find Duplicates Query Wizard),
(Find Unmatched Query Wizard).
, -
. -
.
, -
, ,
.



-
.
, -
, , , ,
.
,
, , , . -
\ .
202 I. Microsoft Access

,
(Create query by using wizard),
.
, , -
, -
:
_ , -
_ -
_ ;
Sum
_;
.

-
. .
, -
. :
_ : Format$ ( [] . [_] ; ' 1 )
Formats , -
.
'mmmm\ ' ,
, : 2004.
,
.
, !, -
,
:
!: Year([].[_]}*12 +
DatePart { '.1 ; [] . [_] ) -1


. Year , .
DatePart , ' 1 , -
. . -

!
.
,
" ", . 4.54.
4. 203

:
Sum - _
CD-ROM Panasonic IDE
17LG
^
CD-ROM Panasonic IDE
FDD 3,5 5
2004 HDD Maxtor 20GB 8
2004 DIMM64MPC100
2004 HDD Maxtor 20GB 3
2004 ;3. Genius Liy 3
2004 17LG 2
2004 CD-ROM Panasonic IDE 10
2004 .FDD3.5 1C
2004 | . Genius Liv in
2004 17LG 7
2004 " 17LG 2
2004 10
2005 "FDD ,5" '
2005 HDD Maxtor 20GB "1
; ] I 18 '

. 4.54. ,



, ,
.
, , ,
, .
, -
.
.

,
, -
, ,
.
, ,
. -
, .
_ ( ).
204 I. Microsoft Access

, , -
. -
, -
. ,
, , -
,
_. Null
, . . is Null,
.

4. ,
, . -
, -
_. _.


, -
, -
,
, -
. -
, ,

.
-
.
, ,
.
, . . -
. -
.
-
(Queries), (New)
(New Query) (Crosstab Query Wizard).
(Crosstab Query
Wizard) _,
.
I. :
_ ( );
:~_ ( );
4. 205

_ , -
.



_ _. -
.

2.
sum ,
.
3. (Yes,
include row sums). -
, .
4. , , (Finish).
. 4.55.

Is1 _|/1_ : [- !
1 - 111 222
_ 17LG 262 150 112
FDD 3.5 60 60!
HDD Maxtor 20GB 10 10
MiniTower 30 30
> CD-ROM Panasonic IDE ; 40
5
: | ^ |[ 5 ' _Mj

. 4.55.


, .
, -
, ,

_, , .
_, _,
_ _, .
. -
, _
_, _.
_
sum.
206 I. Microsoft Access

, . . .
. 4.56.

_ :
_ [CD-ROM | FDD 3,5 JHDQ Maxlor|Kopnyc 11[
111 60 15
222 10 30 12
40
:_1_

. 4.56. ,


/
(. 4.57).

_
; _ _ _ "
: 18 18 18 ! 8 ._
: Sum
: -
:
: [ ] [ ]
: ~

. 4.57.

[ ? |] X ]

{ |
[ ]
[ ] rJ

. 4.58.
4. 207



. | (Query|Parameters).
(Query Parameters)
, . 4.58.


, ,
, -
. -
.
, ,
(Create query in
Design view) .
.
. -
(Crosstab Query) -
) (Query]Crosstab Query).

.
_, -
, . 4.56,
. -
, ,
, .
-
.
_, -
, , . -
(Properties).
(Field Properties) (Caption) -
. _,
.
. 4.57.
. 4.59.
SQL. -
__ TRANSFORM :
PARAMETERS [ ] Text (255), [ ]
Text (255);
TRANSFORM Sum (. ) A3 [Sum- ]
208 I. Microsoft Access

SELECT .__, ._
FROM
WHERE ({(._)=[ ]) AND
( (. __) =[ ]) )
GROUP BY ._ ._
PIVOT .;
TRANSFORM ,

(Sun(. ) AS [- ]).

_ : .
| FDD 3,5
^ 111
s
; j l \

. 4.59.

SELECT , -
{._, ._]. -
.
, , -
. ,
, .
GROUP BY -
. ^, ._.
PIVOT , -
. , -
, . -
, PIVOT
.
PARAMETERS [ ] Text ( 2 5 5 ) , [
] Text ( 2 5 5 ) ; :
[ ] [ ] .
,

(Query Parameters) SQL.
DISTINCTROW , Access
. ,
.
4. 209


1. ?
2.
?
3. , -
?
4. , ?
5.
?
6. -
?
7. -
?
8. SQL ?
9. , , -
?
10. SQL ?
11. -
, ?
12. , -
?
13. , ?
14. , -
?
15. SQL ?
16. INSERT ,
?
17.
INSERT?
18.
?
19. ?
20. -
, 1:,
?
21. ,
?
I. Microsoft Access

22. SQL ?
23. FROM DELETE ,
_. * ?
24. ?

1. .
2. .
3. (View).
4. .
5. (Update Query) (Query Type).
6. (Update To).
7. .
8. SELECT INTO.
9. .
10. UPDATE.
. .
12. , -
, .
13. (Append), -
.
14. (Append To).
15. INSERT.
16. INTO.
17. SELECT.
18. , .
19. . -
,
(Cascade Delete Related Records).
20. .
21. _6.*
.
22. DELETE.
23. .
24. , , ,
, .
4. 211


1. -
?
2. :1
3. ?
4. ?
5. -
?
6. ,
?
7. ,
-
?
8. ?
9. ?
10. SQL ?
. TRANSFORM , -
-
?
12. TRANSFORM
?

1. .
2. -
.
3. .
4. .
5. , .
6. .
7. .
8. .
9. (Caption)
.
10. TRANSFORM.

. PIVOT.

12. GROUP BY.

8 . 835
5

,
Access, ,
.
,
, . ,
, ,
. -
, , -
. -
.



Access. -
,
, -
. -
.

/
, (Database)
(. 5.1) (Objects) (Forms). -

(Create form by using wizard).
.
,

(New) (. . 5.1), (. 5.2).
(Form Wizard).
5. 213

: ( Access 2002 - 2003)

[ ^ ^

. 5.1.

: KpHCTpyKTOrj

:
:
[:
|:
':
. ,
(

. 5.2.

(Form Wizard)
. -
, , .

:
(AutoForm: Columnar), : (AutoForm: Tabular), -
214 I. Microsoft Access

: (AutoForm: Datasheet). (Columnar)


, (Datasheet) (Tabular)
. -
- ,
, , ,
. ,
-
, , . . , -
. , ,
(New Form).
, , , -
(AutoForm),
.


/ Access -
(Form Design).
.
,
(Database) (. . 5.1) (Objects)
(Forms).
-
(Create form in Design view). -
(New)
.
(New Form) (. . 5.2) -
(Design View).

S Microsoft Access
_


_
v^J

/J (/)

...

. 5.3.
5. 215



(Form Design), (Toolbox), (/) (Format-
ting (Form/Report)). ,
-
. / -
(. 5.3),
.

,

(Detail).
(Form Header) (Form Footer)
] /
(. 5.4). -
.

! :
i 10 I II t 12 I

i 9

. 5.4.

.
, ,
, .

,
,
, -
216 I. Microsoft Access

.
(Toolbox)
(. 5.5). ]
.
. 5.5 (Toolbox) -

. , , -

.

. 5.5.

(Toolbox):
(Select Objects) ,
,
;
(Control Wizards)
(, ,
);
3 (Label) , ,
, ;
5. 217

(Text Box) (Unbound), -


, -
;
(Option Group) ,
;
(Toggle Button) ;
(Option Button) ;
(Check Box) ;
(Combo Box) -
( -
);
D (List Box) , -
-
;
(Command Button) ,
, ,
, ,
Access;
(Image) , -
OLE;
(Unbound Object Frame) -
OLE,
;
(Bound Object Frame) -
OLE, ;
(Page Break) ,
();
(Tab Control) , -
;
/ (Subform/Subreport) -
, - ;
D (Line) ();
(Rectangle) ;
(More Controls) -
, -
.
-
,
218 I. Microsoft Access


.
(. ) -
(Text Box), (List Box), (Combo Box).

( )
, ,
, .
-
(Lookup).

, , -
, , -
(Label) (, -
), .
, .
.
-
, .
, -
().
, -
, , .
, ,
, , -
, , , ; : ,
, , . -
, ,' , -
, , -
, .


, -
, ,
| (Viewj Properties) (Properties)
, .
, -
. -
.
, , -
, /, "" -
,
5. 219

.
.


,
(. . 5.4).
(. 5.6).

| [ | |
.. I
, . .
..
. . .
..
. ,
, .
. .
. .
. .
. .
, . ,
. .
. , , , ' . , . . .
. .
. .
. , , . ,
. . 9,998
, . . ()
, . .
, .
. .
. .
X . . 10
V . , 10
. .
. .
, .
, . ()
, ,
, ,

. 5.6.

-
.
| (View|Properties).
220 I. Microsoft Access

,
. ,
, ] (Edit Select Form).
(Form),
(. . 5.6).


. 5.7 (Form Design)
-
. , -
, -
.

(Form Design):
3 (View) , -
: (Design View), (Form View),
(Table View), (Pivot Table View) -
(Pivot Chart View);
(Save) ;
G (Print) ;
(Print Preview) -
;
(Cut)
;
() ;
(Paste)
;
(Format Painter) -
;
(Undu Move) ;
(Redo) ;
(Hyperlink)
( ), Word, Excel
Windows,
;
(Field List) -
;
5. 221

ftiEl-
(

Ctrl+5 ...

...

Ctrl+X

Ctr!+C

Ctrl+V

... Ctrl+K

..,

Alt+ENTER

...

F11

; Microsoft Office Access Fl

. 5.7.

(Toolbox) ;
(AutoFormat) -
, , ;
(Code) VBA;
(Properties) ,
;
(Build) ,
(Expession Builder),
222 I. Microsoft Access

(Macro Builder) VBA (Code Builder)


;
G (Database Window) ;
(Create Object) -
: (Table), (Query),
(Form), (Report), (Web-) (Page), (Macro),
(Module);
: Microsoft Qffice Access (MSAccess Help)
Access ,
.
(. . 5.7)
,
-
.
-
,

. , , ,
, ,
.
(/) (Formatting (Form/Report))
. 5.8.
, -
MS Office.
. -
, , -
-
. :
(Object)
;
(Font)
;
G (Font Size)
;
(Bold), (Italyc), (Underline)
, -
;
(Align Left), (), (Align
Rignt)
, ;
5. 223

_ -I: Arial
.>"

: (/)

: > i

, 5.8.

/ (Fill/Back Color)
;
(Font/Fore Color) ;
/ (Line/Border Color) -
;
G / (Line/Border Width) -
;
(Special Effect: Flat) -
.



, . . -.

(Database)
(Form Design) (Toolbox).
-
(/) (Formatting (Form/Report)). -
224 I. Microsoft Access

, -
(Database).
| -
| (ViewjToolbars Customize) (Customize)
(Toolbars) (. 5.9)
.
(Form Design).
, -
-
(. . 5.7, 5.8).

; ]

:

~ -
"
""
"
"
~
]<
? -*^1
|*
*~

V


. 5.9.


. -
, , () -
. (Customize)
(Commands) (. 5.10) (Categories) -
(Form/Report Design).

(Commands) -
.
5. 225

j |

,
.
: :
< * \




I
* '

_.1 .,.

| '1 ,..

. 5.10.


-
(Customize).
(Modify
Selection).
(Name) . -
(Change But-
ton Image).




.
Access.
,
. ,
, -
. ,
, -
226 I. Microsoft Access

, : ,
, , .

.



(Form Wizard), , -
, .

.
(Datasheet) (Tabular)
, -
, . (Columnar) -
, , -
,
( MEMO, , ).
- ,
, -
.
, , , -
(AutoForm),
.



, -
" ".

( ). -
,
.
, "
". -
: _, -
(. 3) .
. ,
, .
5. 227


(AutoForm).
: (. . 5.!)
(Objects) (Forms) -
(New). (New Form) (. 5.11)
:
(AutoForm: Columnar). / -
, ,
. . .

:
:
;
, ;;

, :
11

. 5,11.

HPLaserJet

. 5.12. , :

228 I. Microsoft Access

: (AutoForm: Columnar) -
(. 5.12). -

(. 3).
(), / -
.
(Form
View) (. 5.13), ,
. -
.

...

...

..,

,..

^: Microsoft Office Access F]

...

,..

...

. 5.13. !
5. 229


, , -
, -
.
(View)
(Form View) (. . 5.13).
(View) , , -
.
-
) (View|Design View).

(. 5.14).




. ! ' . . , IE .1

. 5.14. ,
:
230 I. Microsoft Access^

Access -
(Form Design) (. . 5.7),
(Toolbox) (. . 5.5) (/) (Formatting (Form/Report)
(. . 5.8).



(. . 5.14) ,

.
-
(Label). -
(Label) (. . 5.5),
(/)
(. . 5.8). -
.
( ).
, , .
. (Label)
<Enter> .
(Label)
. , ,
.
, (
) -
.
(Label), ,
. -
.
, -
.
.

(^ J


. -

, .
5, 231

<Delete>
|.



(Text Box) (Label),
, ,
,
.
.
-
.




, .

| (View|Properties) .
. 5.15 :
_ (Text Box: _)
(Format).



.
,
( (File(Save)
(Save).
|3 (File(Close) (LEI) .

(Save)
(Form Name) (. 5.16).
, -

| (File|Save As).

. 5.17.
232 I. Microsoft Access

: JOB
HAMMJTOB v!

j j | | J
| ...!






2,418
0,804
3,011
0,45

-2147483643
, . , . .



-2147483640
, . . . , . , . , MS 5ans 5erif
8






, .






. 5.15. !_,


: . .;
[

. 5.16.
5. 233

:

i
1 ' 1 i Z i 3 ' 1 4 i 5 1-. 1 7 i S i ' 1 10 ' i i 2 i ' 13 1 1 15 1 ."*.!

1*
i .
tetepteyO> ^ 3
~1 1 1
J *

i
JHAHMJTOB " _ |_~

[
. J TOSS

|
3

! |
*:

5:

h |_

1 1 1 1 1 ,

J *

*1
[^0^%<$
\
,-
. 5.17.



.
(View) (Form Design)
(. . 5.7) | (View|Form View).
, -
(. . 5.1) -
(Objects) (Forms) , -
,
(Open).
. 5.18 -
, ( )
.
. -
()
, , .
^|,
234 I. Microsoft Access

I|S B@jS

( HPLaserJet! |?

"\ ''^-*,*\ - - >


| 5 432,00.

| 10% <
^njf :

; 1 1 7 LJ 1^*1 12

. 5.18. /

, ,
, -
.
2.
()
| .

1.
-
,
. -
-
2.


-
.
, . . -
5. 235

. , , , -
- .

( ^
()
- .

.
, , ,
,
.

.
Access -
. , ,
-
. , . . -
.

( )
Access
SQL. -
,
.


, . -
. -
-
.




, -
.
,
, . -
, -
.
236 I. Microsoft Access


,
. -
, . -
,
.
. -
,
, , -
.



, , -
. , -
,
. ,
, . -
, , -

.


, ,
, . . -
.



-
. , ,
, , , -
,
. -
.



, -
,
5, 237

, . . .
, -
.
(. . 5.1)
(Objects) (Forms)
(New). (New Form) (. . 5.20) -
(Form Wizard).
.
,
1:.
. 5.19.

_
_
_
_

. 5.19.

. -
,
. -
-
.
(New Form) (. 5.20).
(Form Wizard)
(. . 5.21)
(Tables and queries), (
) (Aviable Fields)
, . . 5.21 , -
_. ,
_ (
),
.
238 I. Microsoft Access

:
:
', :
(:
i ;
.

. 5.20.

[:

; :

_
_
_

>

. 5.21.


, -
, .
, -
5. 239

.
.

-
(Form Wizard) (. 5.22)
(How do you want to view your data)
(), .
,
.

, , , _,
- _

_, , ..,

< >

. 5.22.

-
,
, (Form Wizard)
:
-
(Form with subform(s));
, , -
(Linked forms).
. 5.22 ,
(Linked
forms).
240 I. Microsoft Access


. -
(Tabular) (Datasheet) (. 5.23) -
. -
() ,
* .


- -
, , -
.
. (Form
Wizard) (Single
Form).

!
f"

< >

. 5.23.

(. 5.24) -
, ,
.
(Form Wizard) -
,
(. 5.25),
5. 241

, ,
.

< > QOTOBO

. 5.24.

, -
: . (Open the form to view or
enter information.) (Modify the form's design).

(Open the form to view or enter information),
(Finish) -
(. 5.26) , . -
.
(Modify the form's design)
(. . 5.25) -
(. 5.27), .
- -
() .
, ,
, ,
, , -
.
.
242 I. Microsoft Access


:
; |
[
:


.
:

^ .

" ?

<

. 5.25. ,

02J

100

Ore. < .
,

. . roe. I .11.->, . *. ion.icj ,

> 002 ; 3,5 16 : 0

005 - CD-ROM Panasonic DE 50^ 0

006
:
24 . 0
0 0

; | j j 2 > I j*-j 3

. 5.26. ,
5. 243

i i 2 i 3 . 1 . 4 - 1 - . i i > 7 i : i i 10 i 1 i 12 1 13 i 14 i .*

*

*
__
', <

1 _ **- ;

_ '

-JHH8HH .
Ore. _
. ' ...
3 1
.. - -'. (;-,- ,-- , ': , , :^- . 1 :.' ' - . " , - -,;1
' 1 ' 2 + 1
5 S 7 i 9 ' 10 '
4
^.-4-.;- -
;=
[ *
[_ . . . 1*| , i.ni,K I [
5 '. L:
j * *%
: _ _ _ _-,|
6 "
| *
.

7
1_
- ' '

J ^
^ i-.---^--i'>', -\-/-' & --. 1 . "-.'-

! i
. 5.27.

-
, , -
. -


. -
(Form Design) .



(Form Design) -
. -
: ,
, ,
, , , ,
. . ,
.
9 . S35
244 I. Microsoft Access

, , ,
.


(Forms)
(Database) (. . 5.1) (New),
(New Form).
(Design View). -

() (. . 5.2).

(Create form in
Design view), -
! (Forml).
' , -
(. . 5.4). |
(. 5.28).
(Data) -
.

| ] |






' _
,


.

. 5.28.
5. 245

,
. 5.29. -
.

1 :
1

i
!
. I X
_
_
_
_
_

. 5.29.


, , . -
, , , -
, .
, : , .


, -
| (View|Field List)
(Field List) (Form Design) (. . 5.7).

.
.

-
. -
. (
). ,
(Caption), -
.
, ,
(. . 5.5)
246 I. Microsoft Access

(Text Box) (Combo Box).


(Text Box)
. , -
: ^ .
, (Unbound):
-
. -
-
(. 5.30). (Data)
(ControlSource) ,
.

I
..
,
, .. _
_
_
_



-

. 5.30.




, -
. . -
, -
(. . 5.28).
,
, .


,
-
.
5. 247

. 5.31 ,
, .

SQL : ['. ^!
<:;<'.4,!|

_ A |':_
|_ \ !|_
_ _.:
^ _ v ITEK v 1 V

< >

: ^ '
;
:
:
:
: *
< -i >

^. 5.31. ,

SELECT3AnAC.KOft_TOB,3AnAC.HAMM_Ttffl,CKflftn.HAMM_CK,CKflA.

_
_
8_

#
... i 1
JCo, .: | _ ; [-1_
!
.: [ _ [. ^

^"" ' " ~'~~'


$%&
I I

. 5.32.

, -
. -
248 I. Microsoft Access

| .
- SQL (. 5.32).
. -

.
-
. ( -
. " " .)



, ,
. -
.
,
, -
.

,



(. . 5.5) -
/ (Subform/Subreport). (Control Wizards)
. -
, ,
, .
'
(ChildTV), (Unbound).
(. 5.33),
.

, -
, . -
, , -
.
(. . 5.33) -
,
.
|
(View Properties). (. 5.34) /
(Subform/Subreport) (Data).
5. 249

:
0 !
! 1
. 1 i 2 I 3 ' i ' 4 i 5 i 6 I 7 i 3 i > 3 i 10 11 Jtl
3 *

[ >
*

[
JWTAJ401 |
__ - _J
DKVJiai
_Y^__
""|_"
iB 1
' -
iL , J

:
4

4 1 ' . ' .:...' ... ' i


. 5.33.

/:

J | |
-
_
_

. 5.34.
( )

- (Source Object)
, , , .
.
.
-
( ),
, .
,
. (. . 5.34) (Link Child
Fields) (Link Master Fields) ,
250 I. Microsoft Access

.
(_).
. 5.35.


. 1J 1111

. [ .2003]
:
01
I

^:

>
1 j 7709575511 11 I

Aj^ec |. 12 [ (61 2)345- 2345 |

. [76350976326')536567 |

: H| jj j| ||>* 1 * j j


\
( )
( )

. 5.35.
( )


-
,
, . -
, -
.

/ (Subform/Subreport) , -
(. . 5.5) (Control
Wizards). (. 5.36) (
), ,

(. 5.37). -
, .
5. 251



, .

f"

<* {

>

. 5.36.


-.
,


: :

|_| _2- |_ _J
1 JLJI JlJ

''' ', '.'


1

< > QOTOBO

. 5.37.
252 I. Microsoft Access

,
, . 5.38.

:
i 1 2 ' i 3 i . . .5 . , - 6 . . .7. . ' 6 . . . 3 . 10 i 11 i 12 i ' 13 i i

) 1 ! B A I^ . D ,\ / VM

j *

i . _ |
1, ,
1 _

' . |_
3KAI
1 1
1 . i 3 , * , 5 , 6 . 7 i ) i 9 i 10 i 11 i 12^

3

^
|"'|~ ~~[ || ~ "4'"*'
j
4


|_ -]|_ |_ |

j *
zJ

. 5.38.

"Drag-and-Drop" ( )
-
"Drag-and-Drop" ( ).

, .
.

.

.


, -
, .

. -
5. 253

(. 5.39)
( /), ,
, (Properties).
, -
- , -

(Default View). -
-

(. 5.39). ,
, .
Access 2003, , -
.

j ] j |


.

. 5.39.

(),
, , . , -
, , .
(No)
(Dividing Lines) (Format). .-
-
(Scroll Bars).


,
. -
.
VBA (Visual Basic
for Application). , -
,
(. 14 15).
254 I. Microsoft Access


,
, -
. -
,
(Text Box), -
.
. -- "=".

, .
,
" " _
. -
,
_ .
- .
: - [; - [ _] .
-
(. 5.40) (Data) (ControlSource).

'

[ ]
, . =[_]*]





. . " . , . -
. , , ,
-

. 5.40. ,

, -
" (ControlSource).
(. 5.41)
Forms .
, -
. -
, .
5. 255


[_] * [] | |
j I

' ___J j
+]-J/]*M-|>|<|<>| And Or | Not j Like | ( | ) | j

D <> ^^
S3 < > AfterUpdate
_ AllowAutoCorrect
_ AutoTab
] Forms BackCobr
- _ BackStyle
1 BeforeUpdate
L- ( _ BorderColor
Border LineStyle
( Reports BorderStyle
(+} Border Width
BottomMargin
CD 9 CanGrow
CanShrink
] CdumnHidden

ColumnOrder
v
" ' " " ~' .__ . ._........! CoJumnWidth ; ^

. 5.41.

, -
, . 5.42 5.43.

: (- .1 st

i 1 i 2 t 3 ! + i ' 5 ' i ' 6 ' i ' 7 ' i i _^.

j *
*

[ 1. i

! !

-
:
[ -1 . -_
; ~~]
2
i i
'. JtfilBX ] ]_ j
3
[ 1 : = [_]*[] V

) ^1

. 5.42. ,

256 4 /. Microsoft Access

. |
17LG

6 587,00.

: . LjJ "" 1 >.il.LJHjj 10

. 5.43.

, ,
.


-
, -
.


,
, -
.

. 5.44.

5. 257

, , , -
(_)
:
- . ( [_1)

(:)
(. 5.44), .
(. 5.45) -
.

1
BBS
Jt]
k
111 ,06.01.200310001 || .. |
222 ,23.12.2002 001 || 20,00,
|12.12.2002||002 || 30,00.

1< !22,12.2002|| || 10,00. j


: 90,00.
d
: | > j _]>*| MS 5

. 5.45. 6





, --.
,
, .
,
, -
.
. ,
_,
.
_
( . 5.46, 8) , -

:
=Summ([ ]).
258 I. Microsoft Access

i

, (Default View)
(Datasheet).


:

= [] : _] . [Form] ! [8]
, Forms "", -
(8) -
.

, -
, :
=[ ].[Form]![ ]

-[ ],fFofmj![

. 5.46.

8
.
() 14, .
5. 259

>

.
.




(Locked). .
,
. (. 5.47)
(Daia) (Locked) (Yes). -
.

:_

j |
.







-

. 5.47.


, -
, (Locked) (No).




, (Data)
(. 5.48) (Allow Additions), -
(Allow Deletions) (Allow Edits)
260 I. Microsoft Access

(No). , -
(Recordset Type)
(Snapshot).
. ,
.

( ]
,






, ,


.

. 5.48.


(Record Locks)
( ) -
. -
.
, .

.

(Data Entry) -
, ,
.
, .


, , -
, ,
, -
- . -

.
5. 261

, , -
(Locked),
. (. . 5.35) ()
.
,
.
(Data). -
(Locked) (Yes) (. 5.49). -
, -
, .

/: |X,
vj

] j
. ,
. . _
. . . _
. . .
, ., J

. 5.49.


1. , ,
?
2. -
?
3. ?
4.
?
5. ?
6. -
(List Box) (Combo Box),
?
262 I. Microsoft Access

7. ?
8. ?
9. ?
10. , -
(Label)?
1 1 . -
?
12. -
?
13. -
?
14. ?
15. ?
16. ?
17. , ,
?
18. , -
?
19.
?
20. ,
, ?
21.
(Columnar)?
22. , -
?
23. -
?
24. , SQL -
. ?
25. ?
26. ?
27. ?
28. ?
29. ,
?
5. 263

30.
?
31. -
?
32.
sum ?
33. , ,
?
34. ?
35. ?
36. ?
37. ?
38.
SQL ?
39. SQL,
?
40. ?
41. ?
42.
?
43. , -
?
44. ?
45.
?
46. -
?
47. ,
?
48. ,
, ?
49. -
?
50.
?
264 I. Microsoft Access

1. .
2. (AutoForm).
3. (Form View).
4. , -
.
5. (Form Design), (Toolbox)
(/) (Formatting (Form/Report)).
6. .
7. .
8. (Field List) -
(Form Design).
9. (Data) .
10. (Toolbox).
11. | (ViewjProperties).
12. (View) (Form Design).
13. .
14. .
15. .
16. .
17. .
18.
.
19. ,
.
20. (Tabular).
21. .
22. SQL.
23. ,
.
24. .
25. .
26. (Toolbox)
(Control Wizards).
27. .
5 265

28. (Text Box),


.
29. (=).
30.
.
31. .
32. .
33.
.
34. =[ ].[Form]![
].
35. .
36. , SQL,
.
37. SELECT SQL.
38. .
39. , ,
.
40. SQL, -
.
41. / (Subform/ Subreport).
42. / (Subform/
Subreport): (Link Child Fields) (Link
Master Fields).
43. .
44. , , .
45. .
46. (Control Wizards) .
47. -
/ (Subform/ Subreport): (Link
Child Fields) (Link Master Fields).
48. .
49. .
50. , .
6


,


-
.
, -
, .
, , , -
, , -
. . , ,
.


.
. , -
-
. -
.
-
,
. -
. , , -
, ,
, :
, (,
, , );
(, , ,
, );
6. , ... 267

(, , , );
( , , -
Word, Excel, . .);
, , , ;
Access, .
VBA
, .
,
.



, ,
-
, , -
. -
- -
, .
-

. -
.
(. 3)
, :
, -
, .
, -
,

. -
/.
,
, .

, ,
. -

-
. 6.1.
268 I. Microsoft Access

-

,


I
I

. 6.1.

Access -
-
,
. , -

.


,
, -
, -
. -
:
, -
- ;
, - , -
; -
(
),
.
6. , . 269



, .
, -
-
, , , .
, -
.




-
:
1. -,
.
2. -
.
3. .
4. ( ), -
, . ,
, :
() ,
,
;
, -
, , -
.
5. , , . ,
- .

.


, , (
2- ) , , -
.
270 I. Microsoft Access

6. , -
. :
-
(,
, , . .);

,
- (, -
"").

Access.
" -
", , -
. 2.19 (. 2).

2, -
2.
- ,
:
3 . "-
", , ;
.
" ", ;
.
" ", ;
G _.
"",
.

_
;
. -
"", -
.

_ + _ -
.
6. , ... 271

: ,
, , . .

.

, . .
.

, . .
.
_, ,
, .
, -
,
_ .
" " -
(. 6.1). , -
" ",
-
.

6.1. " "

- -

I

!

I II

- I!
._
- - I,;

-
,
Access.
272 I. Microsoft Access




(. -
2) ,
, -
(. 5) -
.
- -
,
-
.
.
(, , , . .)
, -
.

- -
, .

.
" ", -
(. . 6.1), -
_
,
.
-
.
Access -
.
-
, .
-
"" .


, -
"" _,
, .
- "" . 2 (. . 2.7).
6. , ... 273

(. . 2.19 2)
, (. . 6.2),
:
(_), (_), -
. , -
. .
"" (. . 2.7 2) -
(_) : , -
, , .
, -

.
.
_ -
:
, , ( -
), :
. . -
"" (. . 2.7 2) -
(_) : -
, , .
, -
.

_.



_ ,
(. 6.2).
(. . 6.2) .
. .
.


(. . 6.2) -
(. 6.3), .
.


.
274 I. Microsoft Access

-
-





KOAJIOK

_

_


_

. 6.2. /

1 ) |

[ ()|


[KOAJIOK ( jj | ()]
HAMMJIO <)| | () ]
|() | | () |
| ()!

- . -

1
- () .
<
>"

^-^ PMOSBI | | |UEHA| |_| | > ] |KOnj1OCT| |_ \

"_ TOBi kp _

. 6.3.
6. , ... 275


_
,
_,
,



:
( . 6.3
):
_ ( );
_ ;
_ ( );
_ ;
d , -
, :
_ ;
;
.
-
, . .
"".
_ :
_:
_ ( );
_ ( );
_ ;
_ ;
_ ;

'
, -
.
. ,
_.

10 . 835
276 I. Microsoft Access

, -
, :
__ ;
;
.




, -
,
_. -
,
_

.
5.
(Forms)
(New). (New Form)
(FormWizard); ,
, .
() (. . 6.3)
(Form Wizard)
, , _,
. (. 6.4)
.,
. -
_. -
(Form with
subform(s)) .

(Tabular) -
(Standard). (Form Wizard)
: " ",
: "_".
: (Open the
form to view or enter information).
6. , ... 277


, .
-
(. 6.5).

- _, _, K04JTOK,
', , , .
- ^ AflPECJIOK, _,
-
, , , ,
; MHHJIGCT, ,

(" '

< >

. 6.4.

!
> 0 - |
^ ( {8S2i34533
|^ | -
[ 1;

[77396711
IKwrBrnwr-^n ^=
, * , ,~ * >*?*< ^ nwrwu uw. . -
'JMae!l?Hi | (,ts;,' yam 1 j 10 mo j t,w;oo
jMw.n1?LG j d ?.<* p^m
K^
rwi :| | isr ?>s
jM<-js 1 a.ii | bSSJ^k- ]1]* j ^ jo i welder
i^WW1 p==
-','>.! [^SoSa ; 1 " 1 so | 18 isejsop
ptDTS" j -^. |)5 i5E '~~~" 10 1 i6^0n

*r | ~ ~ ~ " I
_j| > >* > 5 ' __^_i >T
1 - 1 In *|KS 5

. 6.5. ,
278 I. Microsoft Access

, ,
,
EOCTABKAJUIAH,
.




"".
.
( ) ,
: , , ,
.
.
.
(Database) (Objects)
(Forms). -
-
(Design). ,
(View)
(. . 5.7 5).
, 5.
, -
. 6.7. ,
, "" .
.



-
--
(. . ),
.
(ToolBox) Access (Control
Wizards), (Command Button). -
-
(Command Button
Wizard) (. 6.6).
6. , . 279

,
,

: :

>

. 6.6.



N |1
.

[
[. 12
| infill 1(012)345-2345

|7757651111 . [7635509758

.

* ITOGI |MoHMTQp17LG [.. | 1 | 10 100 700.00
TOOI [ 17LG |6 587.00. | 131 ?..
JIUU1 [ 1/ [ bHMJUp. | ju i s / .
|1002 M ' i > ; '. | .. 1 1 10 50 18150..
| IFDD3.5 | 363.00. [ 3 | 5 111 3630.00.
- | |. 1**| i \

. 6.7. ""

,
. (Categories)
(Record Navigation), (Actions)
(Goto Previous Record).
280 I. Microsoft Access

: (Text)
: (Picture) . -
-
. -
,
(Actions) (Goto Next Record).

.
(Categories) -
(Form Operations),
(Actions) (Close Form).
.
. 6.7.


-
. -
.
(_, ,
_ .),
(_, , ).

-
. (. 6.8)
(Data) (Locked) (Yes). -
.

| I ]
_




:


- I

. 6.8.

6. , ... 281


-
(Save As).


-
,
( , , . .), -
(Combo Box).


.

.
-
, -

.
, ,
.

(. 6.9).

.

,,,,
1^^^^'
[
1
N (111 08 01 2003

" 1
.

HaHMeHOBaHk (

| ^lnliliM "2JI (, 38
'
001 1(995)3-15-6789
/ ?
/
004 |

005

^

. 6.9.


.
282 I. Microsoft Access



(_)
. ,
, -
, -
"".
(Control Wizards).
(Combo Box),
, , ,
. -
(Combo Box Wizard).
, -
.
" " -
. (1 want the combo box to look up the values in a table or query) (. 6.10).


^
.
?

(" ^ " "


| .

f .

>

. 6.10.

,
(. 6.).
_, _ -
(. 6.12).
6. , . 283

,
.

:
:
:
;
:
: _
;
;

" "

< >

. 6.11.

,
?
" ".

: ;

[


_

< >

. 6.12.


(. 6.13).
_, -
.
(. 6.14).
284 I. Microsoft Access


, ,

~ ()



002


_

< > |

. 6.13.


" "


. ,
. " "
6j ?

< >

. 6.14.

(. 6.15)
(Store that value in this field) _ (
), .
6. , ... 285

Microsoft Office Access


" "

.
" "?
XXX XXX
m
.

: |_ ..-.I

< >

. 6.15. ,

(. 6.16).

, ,

, ,
,

" ,
|.

<

. 6.16.
286 I. Microsoft Access

(Finish).
_, ,
. 6.22.
. 6.9.

(List Width) (Column Width) -
.
.
-
(Change To) (Combo Box).

, .
:
(Combo Box), -
(Control Wizards) . , ,
.
(. 6.17) (Data) _, -
. (Row
Source Type) (Table/Query),
(Row Source) ,
.
_ _, , -
, .

: _

| |
. _

. . , . ,
,
. 1
, . ,






-

. 6.17.

6. , ... 287



,
.
_ /.
-
. -
. -
.
(. 6.18) ,
] ActiveX

1 I I I
< N HOMJIC )
_..! L.. I
!
I
1 |_
1
2004 |.> jj |4 _iJ
! 41 m

.'

3 10 11 12 13 14

15 is 17 18 19 . 20 21
22 23 24 25 26 27
29 30 31 "
. 6.18.

. -
"_" (. 6.19).

|| ActiveX: Calendar?
Calendar2

j ( ]
_
OLE
M5CAL,Calendar.7

. 6.19.

-
_.
288 I. Microsoft Access

, -
.
, VBA, -
-
. 15.




.
|j^j -
. -
.
, -
(Command Button Wizard) (. 6.20)
(Record Operations)
(Add New Record), -

.

,
.

: :
[
.



'" -1-3-* >

. 6.20.

,
_ (
6. , .. 289

)
(. 6.21)
(Allow Additions), (Allow Deletions),
(Allow Edits).

| ] |
5ELECT [], [_], [




, ."
I
. ,


.

. 6.21.



, , -
.

,


-
, -

. 6.22.
,
. (Forms),
(Open). -
(Form View)
(Form View) -
1 (ViewjForm View).
290 I. Microsoft Access

. .' 11 ':"' :. ! ' i ' ]

-'"- | N | 1
.

(
(. 12
{ |001
|(01 2)145-2345
|770576511 . ]585732453656
(Mnci

J K o a ^ j . ! ."J

ITODI _ll ( 17LG |6 587.00. ( 1 | 10 ] 1QQ | 5 ?OO.OQp.


|001 _lJ [ 17LG 6507.00. : i 5 | 201 131 740.00.
|001 _lJ [ 17LG 6 587. < | 5 1 .
(? ^J FDD 3.5 | 383. 00. | 1 | 10 50! IB 1SO.OOP.
jlillltJ -d FDD 3.5 | . | 3 | 5 I 10 | -
1 1 1 ]
' ."
004

:) "
007 . , .
, , .

.^

. 6.22. -
""


. 6.22 -

( |^jjj|
).
.
: ( )
( ), ,
.
.

.


-
, |
.


. -
6, , ... ' 291

: (),
() :
. : ,
.
|
()
,
-
,
.
.
, 5 . 5.46, -
. -
.

_ ,
VBA, 15.


-

. -
(, . .
. 6.22). ,
(, , , ),
(Record).
-
.

. ,
, (Find), (Sort
Ascending), (Sort Descending)
| (Edit|Find), [ (Records|Sort).
.
, -
, , -
(Find) (F'.nd
and Replace) (. 6.23)
. (Find Next)
.
292 I. Microsoft Access


: ; _

: v.

: v|
" W

. 6.23.



, ,
.

.



-
. , , -
,
, .
, ,
, . -
, ,
.

(, , . .) -
.


-
. -
.
6. , ... 293


_
[ ] (. 6.24).

!* SQL : ft. ][1](||]

_ |_
VjflATAJCr
_ ^"i _
_ V, ||_ ^

< >
1 1 1

; - _


:
:
: 0 0 0 0
; [ ]
;
< >

. 6.24.


(. 6.25) ( ).

. 6.25.

-
. -
.
,
.
294 I. Microsoft Access

,
.
, .
( )
" ". -
: . ,
.
,
: " " (. . 6.25). -
: " ".
-
. -
. 6.26.

"^^^^^^
. i . . i . z 1 3 i 4 1 5 1 ' < i 7 i 8 i 9 1 10 i 11 i 12 1 '13 i > 14 i 19 i " 17 _^jl

1 *

'^; ! 1 -1

j 1 1 J 1 ^__ I i _ . !,
. , . , . , . 2 1 3 i 4 i 5 i ' S i 7 i 8 i ' i i ' 1! ' i ' 12 > i ' 13 i 14 i 15 ' ' JM
3 *
*
4
! = !|,
1
i i i .. !
5 . ,, , '| / i|AQPEC
T-i'Ei? \ . j
, , . | . . 2 3 1 * i 5 i S 1 i i 11 i 12 13 ' 1* _*

3 f
7
\
1 1 -*
8
_ | | | |
" i i i i i i i i i i i i i *.
1 * -, |

1 >!

. 6.26.



(. 6.27).
6. ,

. ^^]
-31
222 J
> . 1
- -iep |222
^
! i I- [ ]

i
555
> [! 1 100 |1 s 87 00 3
S - ''
|001 | 2 | 12 JMoHMT 0 p17LG j 6587,00.

|TD03 j \ 10 jHOOMaxtorSQGB | 2590,00.

|TOQ4 1 3 1 30 jKopriHcMimTower \ \ 916,00.


i
i!
. | - S | > | |Mfr| 4 jj ____] jj J
\4 | .| || ' f f. \ |>.*| i , |
:
i d
< i
. 6.27. ,

\
-
. ,
, -
, .
- (. . 6.24)
_ . -
Between [] and [.],
.
,
(Unbound).
, .
: .
-
.

(. 6.28).
,
VBA. 15.
296 I. Microsoft Access

- ' '-



loi.oi.2003 | |oi.oi.20Q4 \

111 j 08.01.2003

[, 33

( 01 | 1 |

100 | 17LG 6587,00.
3
|001 | | 20 ( 17LG 6 567.00.

ITOOI ! [ ( 17LG j 6537,00.

|002 1 | 50 (FDD 3.5 | 363,00.

|002 3 | 10 (FDD 3.5 | 363,00.


: J 1 1 ( J J ( |>#] 5 J 21

; 11 | > | |*j 2
,
. 6.28. ,

1
-
. . 6.29.
,
. -
.
-
, ?,!, -
.

"" (. . 2.6 2) -
:
-
, . 6.30;
,
.
, -
,
.
6. , ... 297

&

N 0001

jnCOl

[ 1778957651
1
. (, 1 5
|. 1 2
|(1 2)3^5-2345

JO" !

. 6.29. ,
""

"" .

htCW_HAKJI
_
_
1-_

. 6.30.
298 I, Microsoft Access


1. ?
2. -
?
3. , , -
(-) ?
4.
?
5.
,
?
6.
?
7. -
?
8.
?
9.
?
10.
?
11. ,
?
12.
?
13. -
?
14. ?
15. ,
?
16. , -
?
17. ?
18. ?
19. , , -
?
20. -
, ?
6. ... 299

21. -
?
22. , -
?

1. , .
2. .
3. --.
4. .
5. ,
.
6. .
7. , ,
, ,
.
8. -
.
9. .
10. , , , .
11. .
12. _.

13. .
14. (Data)
(Locked) (Yes).
15. .
16. .
17. , , .
18. (Data) -
(Row Source).
19. (Data)
(Control Source).
20. .
21. -
.
22. ,
.
7

.


.
, -
.
, ,
.

^ \
,
. , -

, .

, , -
.

. -
, ,
. , . 1.3 -
I , -
-
, , .


, .

, ,
Access , -
7. . 301

. . -
.
,
,
Microsoft Internet Explorer.
-
| -
. -
.

.


Access
, .
-
,
-
.
,
,
.

. SQL Server
, -
.



.
, , -

.

. . 7.1 ,
.
302 I. Microsoft Access

+ |-j|
+ ]
+ ]
V
[J]

. 7.1.




.
,
.
, .

. , (Field
List) (Pivot Table View). -
.
-
.
, -
. , .
, . 7.2.
,
, -
. . 7.3.
-
(Add to),
(. . 7.2).
7. . 303

I -IX I-1


[
*
:+ [
TDQ1 Y
[J]
|
[

002

005

. 7.2.

:. BBS

] *i
* 002 01 001 5
+ HD02 ; 001 2

* CD1 001 2
* .CQ3 001 ' 2

* 004' CQ1 TOQ1" " "2
* 002 CQ2 002 5
* 02 002 10
* 004 02 002 10 -

* 002 3
+ 002 ' 02
* 004 02 1
+ HQ01 01 005 20
+.001 02 005 4

X * HOD2 02 TOQ5
* ;
02 TQQ5 "10!"
- 001 006 5
* 002 1. v
: 1 1 15 | ^*J 22 jiL J jJ~
. 7.3.
304 I. Microsoft Access

. -
(Add to):
(Row Area);
(Column Area);
(Filter Area);
(Detail Data);
(Data Area).
. -
- ,
.
, -
-
Delete.
, ,
.



, . -
(Pivot Table View) (AutoCalc)
(Sum).
,
. -
(Hide Details) (LMJ).


. 7.4.
-
, -
.
" " (. 7.4).
. -
, .
, , -
. 7.5.
,
. -
, .
(1_).
7. . 305

:
^

eger>.,'-? ' r> s :-;.-; ajjjvayo
TiJ
* " "!
^ "
_ : "~2 ]
002 " * 25
[J]

! 12

5 ! 40

TUQ6'* 6
]
'
13
|| 130

. 7.4.

. 7.5.

,
, ()
.
"+"
. "--" .
, ,
.
, . -
,
306 I. Microsoft Access


.
, -
.
. ,
-
(. 7.6).


'" ''
CD2
. . . . - . . . . i . - . . . . .. [^.. I . . . . ___ _ .. . . . . . ....
[ ": "' " "
TGQ1 :
; 02 .
"
005 20 .
" -.
TQQ8 1
! .
"

. 7.6.



, -
. 7.7. -
,
.
.
, -
.
, .
,
.
.


,
.
7. . 307

_
_

^
_ _; .V

_
_
_
_
_
_
_
_

: _ *
;
:
: 0 0 0 0
;
; 1
* ' >,

. 7.7.

riiiiii ana
* ;

-

jior - 1
111 222

'.
1
- " " " " ..
CD-ROM Panasonic IDE ! "24 " 16 40'
DIMM64MPC10Q +_ 5 1 6
FDD 3,5 ' "-* 15 10 ' 25
HDD Maxtor 20GB ! ; 15 12
: " "
. Genius LJv 13
: FDD 3,5
17LG * 23
: 0.222
1
: =
11

. 7.8. ,


(AutoCalc) (Sum). (. 7.8)
11 . 835
308 I. Microsoft Access

,
, .
, -
, .
, -
(. . 7.8).


-
: , -
(. 7.9).

(. *

tj 2004
+ ) HAMMJ10K t.-figKBl
- h/
;+ ] _
]
2
~-
[||] L+>[_12005
[U


[3
[EJ
[D
-
[3
[=]

^
[3
[JJ

+< []]

. 7.9.

-
.
7. . 309

-
.
-
, -
. . 7.9 :
2004 .




, , . ,
, .
.
.
. ,
, ,
(. 7.10).

8* : OfellS
1.1
2004
|_-* ;_ -
: | I
111 ;322 . ' i

' "^ ' ' " ' "


CD-ROM Panasonic IDE -! 24 1G" 40 40
DIMM 64M PCIOd 5 1 1 6
FbD'35"" '_ "4 15 15
HDD Maxtor 20GB 8 i . 11
. Genius Liv 10 ' i ! 3 13
17LG2^ 12 7 19 4 4 23
1 10 11 11

. 7.10.

-
-
,
(AutoCalc).
310 I. Microsoft Access



,

. , .
, , -
,
.


(. 7.11), -
, , , -
.


:
3_: | " "!
: ^ & - ~
__ __j j_ __j



[Measures], [ 1 ]
!

. 7.11.


,
.
(. . 7.10)
, . -
7. . 311

, ,
. ,
. ,
.


.

. (AutoCalc).

. -
(Calculated Totals and Fields) (Ll!il) -
. (. 7.12)
(Name) -
. -
[ ]/35 .
(Change),
.
-
, (AutoCalc).
, , -
.
(Calculated Totals and Fields) -
. -

(. . 7.12).
.
() (. 7.13).

,
.
,
. -
.

. (Calculated Totals and
Fields) . -

" ".
312 I. Microsoft Access

| ]


: !

[Measures] . [1]/35

[ " " ()

. 7.12.

HHBHOi

| | \ ] |

X ' ftl 21 ^____^


; | ()


s=- j | ^

; ]Arid Cyr "jj jlCi

: j ()



, ()
~ ^^.-^^^^^^^^^^^^^^^^^^^^^^^^ ^

. 7.13.
-

,
[]* [ ]/35. (Change).
7. . 313

, -
. (), -

() . (AutoCalc) -
-
. , -
.
, ,
, , .
, -
, () . -
- .
-
. 7.14.

g11 _ : -]!'*]


_' HOMJ-!
:
J 1
t -; ..:+': ..

> | " | '
64 PC1QQ """5,43 10,29 61 ,71
HDtf Maxtor 2QGB~"~ ~~ 109,71 109,71
. Genius Liv 7,63 67,63
17LG . -, '_ ~rj
376, 40 376, 40 752, 80
668, 00 68.00
1 095, 83 564, 03 1 659, 86

. 7.14.

, ,
, .

(. . 7.14) " ",
(^.) , -
, .

. 7.15.
314 I. Microsoft Access

6^ _ [

J.IT.I

- '
-
' ;0

+ - '+ - . +
: .'

^ * . " ] " [ " TOBj


64 PC1QO " ~ ~",33% 16,67%~ ^ 100.00%
HDD"Maxtor20GB" '*\ 100.00% 100.00%
m
. Genius Liv 100,00% 100.00%
17LG "": 50,00% 50,00% 100,00%
'": 100,00% 100,00%
66,02% 33,96% 100,00%

. 7.15.


,
.
-
, -
,
, .
, (). -

(View).
-
. , ,
. . -
-
(), . ,
.
(Show Legend)
. -
.

. (Format)
7. . 315

" ", -
- " ".
.
. .
, .
100 000 80000,
.
,
.
_
, . 7.16.

|! _ : Qfo |[]


i
.1 " "

: 1 1 1 - 17LG
" ": 79 04^00,

1
1
- !
3 N jor * i
- 1 1 1
1 ... fri ,
LLJ i/J [D >
5
' S " -1 ^ ^ D -
<-> R
0. Q \_ -5 0)
i s
- te :
. -

5
1
5
S
P.
5

F 1
Q
Q : =

. 7.16. _

(
), ( )
.
316 I. Microsoft Access

. , -
, -
,
(Chart Type)
(Column), -
(. 7.17). , -
,
, - .

| |j
^
[L>-
[*

\_
?;
|
Q
^
IjjJJIL
()

. 7.17.

, . 7.18.
,
.
, 160 000.
,
, ,
. -
. -
7. . 317

, . . , ,
, .

? :

!
w
lUP

" "
to
I

&
4
8


8 : HAHMJTOK_jJ
HOMjior ' !
| 25000,00.-
1 D -
1 - 222
gg'l ' ' g 5 3 S - 1 1 1
W ~ <J , t '

1 1 i1!1
fi Q- Q | ^ &

s
S s P s
i
Q
Q
g I
I
.n

'

. 7.18.

. -
, . 7.19.
.
,
. .

.
-
. -

(Data) -
(Show Details). (Common)
318 I. Microsoft Access

(Element) -
(Cart Area). (Show
Details)
.

_ : '"' <J

/
[ "

" "


|
;
'
17LG

HHI 3 . Genius Liv


D HDD Maxtor 20GB
*J ;
pf t-r D FDD 3.5
DIMM64MPC100
0,00.-

' CD-ROM Panasonic IDE

1 1 1 222

' : "

. 7.19.


, . -
.
, -
.


1. , , -
?
2. Access
?
7 . 319

3. -
?
4. ,
?
5. , -
?
6.
?
7. -
?
8. ?
9. -
?

1. .
2. , , .
3. | (
).
4. , , , .
5. .
6. -
.
7. .
8- .
9. .
8


Access
,
. -
,
, , .

.
-
.
, , ()
, , ,
. -
, . ,
.
.

. . -
.

. -
-
. -

.


-
.

. , -
8. 321

, ,
. 5 . 5.5.


-
, . 8.1.

Is

W 1 : ^][
i 1 i 2 i 3 i * i 3 i_l

j
< /

^^^^

*06

1:

2
J
J * 1 OHTMTV



J * >


1
4| 1 7

. 8.1.

,
| (View Page Header/Footer) )
/ (View|Report Header/Footer).
-
(. 8.2).
-
. -
. -
322 _ I. Microsoft Access

, -
, .
.
.
-
(Report Header)
(Footer). , ,
, .
.
10 .


-

.

(Detail), . -
, ,
.
, ,
, , , -
, , . .
.
. 5.5 5.
, -
. -
.


,
(. . 8.2) .
, -

.

v ^
-
(. . 8.2). -
,
.
8. 323

- VKTOD

.., Ctrl+5
4.. ...

Ctrl+X

Ctrl+C

CW+V

.,. +

.,,


Alt-t-ENTE!^

,..

QKHoSajbi F'.l


: Microsoft Office Access 1=1

. 8.2.


-
.
-
.
. 8.3.
.

.
.
.

.
.
324 I. Microsoft Access

. 8.3.



(Database)
(Reports). ,
(Create report). -
:
G _, _, , _, _,
;
_, ,
;
1
] _ ;
(Stepped) ,
, (Portrait) ;
;
-
(Adjust the field width so ail fields fit on a page);
" ".
,
. 8.4.
,
.
8. 325

, ?_ ,
, .
. -
.
,
(. 8.5), 4


_ _ _ _

* 01 763585&763264555

005 763585097632645353

02 293847898239429334

007 654327890345675678

005 S97969Q8790S79S425

04 585687897685746478

23 2CD4 . I'.! 1

: >

. 8.4. ,

: :

|_ 4 ! * 1


1-
2
3
4 ^^^^
5 |

. 8.5.

326 I. Microsoft Access

,
4 4 , -
. -
=Left { [_] ; 4 ) ,
4 . -
.



, -
.

, . 8.6.

1 i 2 i 3 I 4 i 5 1 6 I 7 I 8 i 9 i 10 i 11 i 12 > I 13 i

! v

1
* <
< mmjiQK |[<_ JEAHE IIOIV [

f ' '

L. . . ..I---I
* =
|)_ 1 |1_1) || IjjHOMl

** KOI >
1 1 1 1 1 I !.._..,
= "4|" & [] & " JQ " & [Piges]
: 1 1
* J
I
. 8.6. , ,


, -
,
(Sorting and Grouping), -
.
, (. 8.7). -
8. 327

_, -
, .

( 1
:
^'
/ | |
| > J1OK 1
_

!
V



67
) ;
1

. 8.7.


(Yes) _ (_ Header) -
_ (_ Footer) . -
.
, , 6, -
-
_ ,
( -).
.

_ (_ Header) _ (_
Footer) (No),
.



, . -

, . 8.8.
, -
.
instrB ,
. instr -
, _ -
328 I. Microsoft Access

(,). mstr
. -
. L e f t
_ ,
.
: . , -
, -
.

i
/ 1
(Si> =1([_];(151:([_];',')-1)) jj
HAHMJIOK

. 8.8.
_


_,
(. . 8.10).

;
,
.



(Header).
, instr Left.
,
_ , .
(. 8.9),
(Field List) -
, .
8. 329


1
_
_

_


^

. 8.9. ,

,
.

W : [L ]jfclfXj

'
;
' . , , . , . 4 . , , 5 , 6 i 7 i i i 10 i 11 i 12 i 13 i ' i 1L.

*
L
i Cr [ <1! (!VI 1
__._
|=Nowj) / >
L |), ;<ix: "=Co'i
*

^ . h! ,eft ([ TP1
^ =1[_];(15([_ TOKiv) -1))'
)K|

{
L
a

__
*0

j ||1>[1 [
* t |'=11:([_];51:([_];' >!))'

JBcero rojiifle: 1_J |=C[ojint<[pAHM _]


IEAHK! PHOI _|

-I
-|____]

*
-.~ "1
="cfej^" & [Pake] | & " b "&"[

j
j
-- -
^ j
I

. 8.10.


, -
330 I. Microsoft Access

. ,
, -

. -
, , -
, . , ,
(Label).

, -
.
. .
, , -
.

, , , , -
. 8.10. , -
(Line).



-

_ (?_ Footer) (. . 8.10). (Text Box) -
(Unbound),
-
(, , -
.).

(Data) (Control Source). -
.
(Format) -
, (Format) -
.
-
(Unbound) _ -
count
(. 8.11).
.
. (Format) -
(Caption) . ,
8. 331

, , -
.

: 13
I 19 v- '

j | j j
1 ...|
,
. ,
-

. 8.11.

-
,
(Format) -
.
.



.
NOW{) /, ,
,
(Text Box) -NOW ( ; ,
/.
(Format) (Format)
. . -
.


=""&[Page]&""&[Pages]

, -
(Data) (Control Source).
.
N -
, .
.
, -
332 I. Microsoft Access

| (Insert|Date and
Time). (Date and Time)
(Include Date) / (Include Time)
/
(. 8.12).

[?j!^l

- -Iv' }f+, ** ^ f\V

27 2004 .
27--2004 __^!!!!!^__
27.02.2004

'. <?



27 2004 .
1

. 8.12. /



^* N

N

'1
|

1 1 _ ..
:
v ,
1

. 8.13.

' ,
(Data) (Control Source)
= D a t e { ) .
.
8. 333

, -
] (Insert|Page Number).
(Page Numbers) ,
, (. 8.13). -
-
(Show Number on First Page).



-
(View) -
. -
(. 8.14).

...

jp

j^'

" :

[ Office

" | iff}-- : Microsoft Office Access Fl

. 8.14.


(Reports)
(Preview). , -
(. . 8.16).
-
.


,
. [ (FilejPage Setup)
334 I. Microsoft Access

, , -
(. 8.15),
, (, ) -
, , , .




: 5

...
(""

-

. 8.15.

5
.
Microsoft Access .
.


. , ,
. -
-
.
(Print) -
(. . 8.14) .
, .
[ (File|Print),
. , -
, ,
8. 335

, , -
, , -
. ,
.
. 8.16
.


27 2004. : 6

1 7635509763364536
76358509763364536
002 29384789823942931:

: 3

1 2
:

. 8.16.


Access -
,
.

. -
.
, , -
356 /. Microsoft Access

, -
.
-
. , ,
, , -
.
, . -
.

SQL
.



,
, ,
, .
, ,
. 8.17. -
, , -
. .

, _
.

. 8.17.
8. 337



(Reports),
, .
(New), -
(New Report) (Report
Wizard). ,
, , .

(Report Wizard), -
, .
(. , 8.17) :
, :
__;
^;
_, :
_;
_;
_;
G , :
_;
;
;
_;
, :
;
_;
_;
;
, ;
_.
,
.
-
" " (. . 3.30 3}
338 I. Microsoft Access

,
. -
, -
. ,
, ,
. 8.18.


_
_
_

_
_06
GPOK_nOCf
MMHJTOCT
_

. 8.18.

(. 8.19) . -
, , -
,
-
.
, -
,
, . ,
, , ,
: -
, .
_ -
. , -
, .
8. 339


: _, _, ,
, , .
|: '" , , ,
_, , , _
- _
-

J*J

< >

. 8.19.

I > 1 . I J > i 3 ' I 4 I 5 i ' 6 ' I 7 I 8 I 9 I 10 I - It i 12'"~13 i 1* > ' 15 i 16

| *
^^ ~"'||!] )^ "| " |CI.IBM|
U * _
1 rr-'-"t I
|]

J *

E
Npw()
;.! L ._!.: L.M .:.). L...I -. J ....i:.-. " " 8. [Page] A "
J *
(

. 8.20. ,

12 . S35
340 I. Microsoft Access


, , -
. -
, -
, .


.
. 8.20.


. , -
. -
-
.
SQL:
SELECT . _, . _,
nOCTABKAJUlAH . CPOKJIOCT , _ . _ ,
_._, . _, . ,
. , . _ , . ,
. _ . JIOK, . ,
. _, .
INNER JOIN ( ( INNER JOIN ON
. _=?._) INNER JOIN _ ON
. __=_ . _ ) ON
. _=_1 . _ ;

SELECT , -
FROM .
, ,
SQL . ,
,
: , .


, -
. ,
, SQL -
.

(Field List), -
. -
SQL, , .
.
8. 341


,
.

, -
(. . 8.20).
. ,
,
, -
.


-
.

, -
, . 8.21.

,<1""|| ""
10| I > :

|HA!M_ipB
* J

. 8.21. ,
342 I. Microsoft^ Access^

,
.
,
-
.
, - .


, .

= []*[_]. -
, (Text Box)
. (Unbound)
.
, .
. -
(Data)
(Control Source). (Format) -
2, (Format) -
.
, .

.
,
.
(Unbound)
=sum( [_] - [] ) .
, . -
.
, '-
.
=IIf ( [44]>1000000;' ' -
1 ; ' ' ) , 44 , -
. -
, ,
. . -
, -
.
, . . iif
.
8. 343

-
, 8.22.
, .

?*
77W*65MI1
EMIHK
76358509763264536567

.
HiR.li*.] 1

FDD 3,5 - .
S7LG tl 5S7,OOp.
17LG 28 5S7,OOp
FDD 3,5 10 363,

I7LG 10
! 009 830,00.

1|*,.1 1 3
23 ( 2004 ,

. 8.22.


, -
. ,
.
.
-
. -
_. ,
[ ] .
344 I. Microsoft Access

-
(. 8.23).

(~~

. 8.23.

-
.

1
, ,
.

2
, -
. ,
.


,
.
, (. 8.24).
, ,
:
, :
^;
_;
;
;
_;
;
8. 345






FflnHtii(a n.iMfipp.Hiia


: :

. 8.24.

, :
_;
_;
_;
, :
_.
, -
. 8.25.

_6 1_
_ ^
^
_
_

_
_
_
_
OTTF

. 8.25.
346 I. Microsoft Access

,
, -
. ,
.


, -
, -
. ,
, (New
Report) : (AutoReport) -
.

:
a jq
(][ 111
. , . , , . . , . 3 . , I - 5 - . . 8 . . . - . - - !

J *

. ,"|

*
J * _
1 J
\

1 " 1&< ' WffOf HUl'lhil


-
-
, \ UHA

[ mtepe \ v\
' ^.
\Cmat ? ft, J

<(

_
5

J f
"&lf age/^fMj " UAz^t
J * :
Z ] !
^

. 8.26.


, -
8. 347

.
, .

. 8.26.
, -
, -
. .


, -
. -
,
.
.
,
. , -
_.
/ .
. 8.27 ,
.

: :

_ ]
;






. 8.27.

, ;
(Summary Options),
_. -
, -
. , . .
348 I. Microsoft Access

-
. . 8.28.


_-
2004
01 TOOS 10 25.01.2001

01 008 I 25.01.2001
01 25.01.200-1
1
' 2 20.01.200-1
( ' 7_071 = W.Q1.2QQ4 (4 )
Sum i

2004

2005
02 1 21.01.2005
02 002 IQ 21.01.2005

'F\TA_OTfP' * 21.Q1.2QQ5 (2 )
Sum

2004. 1 2

; I

. 8.28.

, -
, .


-
. -
.
.
8. 349

, -

(. . 8.26).
.
.

1
Access
, . . -
. ,
.
/ (Subform/Subreport) (Data)
(Link Child Fields) (Link Master
Fields) (. 8.29). -
/ (Subform/Subreport), ,

/:

| | |
- .
_
_

. 8.29. ,





. -
/ (Subform/Subreport).

(Control Wizards). -
(Unbound) ^ Chi Id .)
-
. -
, , .
,
. , -
/, (Data)
- (Source Object) -
350 I. Microsoft Access

, (Link Child Fields), (Link


Master Fields) .


,
, .

;
2 i > 3 i 4 i 5 i 6 i 7 i 8 i 9 i 10 i 11 i 12 i 13 i 14 i

5 "

}]_
; L i

frrjif
lUEhfe"
vuepe [

i . I . i 2 i 3 i ' * ' i 5 i 6 i ' 7 ' i 8 i i 10 ' i 11 i 12 i 13 i

J ^

I JCco

* '_'

'_'

i1=[
i i otrP]>
i
#
&0 &
"~ -] - - - j -- - ^-



. 8.30.

8. 351

, .

(). .
, , -
.
-
. -
.
, (Page Header/Footer)
.

, ,

.
, , -
, , -
, , .

. 8.30.


,
, -
. ,
, -
.
,
. -
. -
,
_ Between
[ ] And [ ].

, .
. ,
, . -
, .
, -
. :
352 I. Microsoft Access

= [ ].
.

. Access ,
.


,
. -

(Sorting and Grouping). ,
( ) -
(Sorting and
Grouping). -

.


, -
, (Report View) -
.
. 8.31.
(Print)
.
,
, -
. ,
.
-
, -
, , -
, .

, .
-
, , -
, ,
, ,
( Null). 4.
8. 353

^ g][E


IT 001

( 17LG

\ 6 587,00.
| -

g%


.

2004
|01 JT001 10 25.01.2004
|" |001 2 20. 01 .2004
: 2 : 12

2004
|01 JT001 2 25.03.2004
| |001 2 26.03.2004
. 2 : 4

2004
|01 |001 2 28.04.2004
|01 [ 01 5 29.04.2004
: 2 : 7

23

29 2004 .- pa i 1 1 0
jd
: JJJ 1 ^ J^J j Jij >

. 8.31.



.
.
, 12, 4,
7, (RunningSum)
354 I. Microsoft Access

= , :
12, 16, 23.
.

3
, -
( ).
, , -
. -
, ^
, . -
. -
.

(RunningSum).


1. ?
2. , .
3.
?
4.
?
5.
() ?
6. ?
7. ,
?
8. ,
?
9. , -
?
10. ?
11. -
?
12. , ?
13.
?
8. 355

14. ,
?
15. ,
?
16. ?
17. , -
-
/ (Subform/Subreport) ?
18. ?
19. ?
20. , ?
21. , -
?
22. ?
23. -
?
24. ?
25. , -
, ?
26. 1'
27.
?
28. SQL -
?
29. , -
?
30. , -
?
31. ,
?
32.
?
33. -
, ?
34. ?
35. , ?
356 I. Microsoft Access

36. , ?
37. , -
i i f - t [_]> 000; ' -
' ; ' ' ] , 70 ?

1. , , ,
.
2. .
3.
(Field List). .
4. , .
5. .
.
6. .
7. . -
, .
8. .
9. .
10. N O W ( ) .
. (Text Box).
12. { (File|Page Setup).
13. .
14. .
15. .
16. (Data).
17.
(Control Wizards).
18. - (Source Object).
19. (Source Records).
20. .
21. / (Subform/Subreport)
22. .
23. .
24. 4.
8. 357

25. -
.
26. Sum, Avg, Min, Max.
27. SQL.
28.
(Record Source) .
29. SQL .
30. .
31. (RimningSum).
32. .
33. .
34. (Criteria).
35.
(Field List).
36. .
37. .
II


Access

, -
-
.
, -
.

. ,
Access , . .
. -

.
Access,
.
. -
, -
,
Windows 98, Windows 2000/XP Professional. -
. ,
-
. -
, -
, ,
.
, Windows, -
, -
.
. , Windows XP

362 II.

., ,

. -
, -
.
, , -
-
. , ,
Microsoft Windows Network, ,
, .


, .
.
, , -
, .
, -
, NetWare Novell Windows NT/2000/XP Server.

, ,
.
.

, .

, .
,
Microsoft Access ( )
( ,
). Access -
-
, . . Access -
. Access
. (runtime)
Access. , -
, .

( ^
, -
runtime- Access , -
Access, Microsoft Office
- Microsoft Office Developer Tools.
9. Access 363

, ,
Access.
,
.
. 9.1 -
" ", ,



,
, ,
, ( )
, ,






..



,, .,

. 9.1.
" "

Access
-
-
, , ,
,
. Access , -
.
, Windows
-
364 II.

. ,
, -
,
. ,
. -
(-
), .
, -
, , -
,
.
-
Access.
,
, -
. , -
, NetWare Novel
Windows 2000/XP Server, -
.
-, ,
. -
.
-,
.
, -
.
.

.


Access
. Access
-
. -
Access.
, -
.
-

: , , , .
9. Access 365


, .


Access, , -
, ,
, .

.
, -

. , , -
, . , -
,
.
-
.
, " "
: -
, , -
, .
. ,
,
, ^ .,
. -
, , -
. -
,
, . -
-
, ,
.
Access -
Admin :
(Admins) (Users).
Admin
Microsoft Access.


Access , -
Access, System.mdw.
366 II.

.
Access.
, Access -

Admin,
. Admins -
. -
, , , ,
, . -
, Access
,
,
, , , .
Access , -
)| (Tools|Security|
User and Group Accounts) A d m i n .
Access, . -
, Access, .
Admin ,
(Logon), . 9.2.

. 9.2. Access


, ,
.

( ,
, ),
Admins. Admin
Admins. Admin Admins -
, . .
.
Admins -
, -
9. Access 367

, , , -

. -
, , , -
.
: -
Admins Users,
.
Users -
Admins. -
Users.
Users -
/ . Admins
, -
. -
Users .
,
Users, .
. , -
Users, ,
, .
,
() (Tools| Security]
User and Group Accounts), Access. -
|
) (Tools|Security|User and Group Permissions),
. ]
| , ,
(Logon), -
.
( ),
.
Access -
. Access
. -
, -
Access. ,
, , . , ^
-
Access.
. ,
Windows XP Professional
-
368 II.

Systeml.mdw, -
1___\}\\1$ and 88\_/-
0\1 Data\Microsoft\Access.
Access .
-
, , , -
. -
mdb.
, ,
|| (Tools|Security)
Workgroup Administrator). Access.
, ,
.
,
. -

, Access. , -
, Access
.
-
.
(Workgroup Administrator), -
(Save). {3|
(Tools|Security Workgroup Administrator). -
(. 9.3) -
, WID-, -
.


,
.

,
, ,
20 , .

. 9.3.
9. Access 369

.
,
,
.
Access
. Access, -
||
.
,
(Browse) (. 9.4). -

UNC \\_\\_1.
, -
,
.
, -
.

: stion Daca\Microsoft\Access\5ystemlmdw

. 9.4. Access

, , -
, -
Access.

, Access, -
Admin Admins Users,
Access . , -
-
. -
, -
, HKEY_USERS,

, .
(WID) -
, .
370 II.


-
Access (Security)
(Tools). -
, ,
(User and Group Accounts).
(User and Group Permissions)
.
(Set Database Password) -
.
,
(User-Level Security Wizard).
-
.



-
.
, . -

.


, -
(Task Pane) (File), -
, -
.

, -
, ,
| (File|Open Database)
(Task Pane) (More).
(Open)
(Open) -
(. 9.5).
.
(Open)
, , -
;
9. Access 371

(Open Read Only)


.
;
(Open Exclusive)
-
;
(Open Exclusive Read Only) -
.


: , ... -

^__ .
'{JjrioKy . md
^ poe.mdb
:
4 ,! OPr.mdb
^JJTIpti :* _ . rrdb
^ n. mdb
dj _ . md b
]_2003,1
' _2004. mdb

:

; Microsoft Office Access (*.rndbi*.3dp;*.mda,'l'.rride;*.ade)

. 9.5.


, -
(Exclusive).
-
. ,
, .
,
, ,
13 . S35
372 II.

,
. , , -
.
,

.


, -
(Open). , ,
, (Open).

, , .

.
.
, ,
(Open Read Only)
(Open Exclusive Read Only).
, . 9.6.

Microsoft Office Access

t
' 1 .

,-

. 9.6.


. , -
, , (Edit)
.
-
, -
. -
.
, . 9.7.
,
. -
9. Access^ 373

, -
.

Microsoft Office Access

'0:\_2003\ TaeapOB.mdb' ,
,
1 ) .

'Microsoft Office Access' ,

' '!'

. 9.7. " "


-
.
, ,
.


, ,
(Options) (Advanced)
(. 9.8). | (Tools|
Options).

, (Default Open Mode) -
(Shared).
,
(Apply). -
.


, -
.
, -
.


(Open)
. , ,

.
374 //.

| ] ] ]

DDE -
DDE; [Access 2002 - 2003
DDE

;
*'
*"*'
OLE^DDE ():
-
(); [
~J {*
; '""*
ODBC (): J1500 ("

(); 250

. 9,8. ,

,

-
, . -

. Access
-
. ,
, , .
,
-
. Access
-
.

, -
.
' 9. Access 375


, , .
, , -
, .

, -
,
.


,
Visual Basic , .
(Record Locks)
(Data),
(General), (Other).

, -
, .
,
, , .
, -
, ,
.
(Record Locks) -
-
.
, Access ,
-
.
(Record Locks)
:
(OnLocks) ( ).
.
. -
-
.
, Access -
, .
, , -
; -
376 II.

.
, -
.
(All Records).
-
, .
,
, -
, -
, -
. .
(Edited Record).
(Record Locks) -
. .
4 ,
. -
, -
,
.
Access
.
-
(Open databases using record
level locking), (Advanced)
| (Tools)Options). -

. -
,
.
-

11.
.,
,

(Record Locks).

,


(Record Locks) ,
& Access 377

. , ,
, (Tools)
(Options). (Options)
(Advanced)
(Default Record Locking) (. . 9.8).
, (Options)
(Tools) .


mdb
Access Idb
, .
-
. Microsoft Access -
. , Access -

.




.
, .
,
, )
(RecordsjRefresh). -
, Access
: ^ (. 9.9).
, , -
.

, ;
.

Ii , , -
. , -
.
, -
, .
378 //.

LJ , .
.
Access .

:
]
* 001 17LG 6587,00. 5%
+-7TJQ2 FDD 3,5 363,00. 6%
+ HDD Maxtor 2QGB 1 260,00. 16%
+ TOQ4 MiniTower 916,00p 0%
* 005 CD-ROM Panasonic IDE 1 153,00. 30%
+ TDQ6 DIMM64MPC10Q 360,00 15%
+
# # # # #
* 2338,00. 16%
+ TQ09 . Genius Liv 789,00. 10%
Genius ext 1 295,00. H3L pl^p.
~j
1: 1 ^ | 9 > | 1
i 10

. 9.9. ,


Access , -
, ,
.
, -
. -
<Shift>-KF9>.



Access -
,
.
.
] (Tools Options) -
(Refresh Interval)
(Advanced) (. . 9.8).
, -
.
(Refresh Interval). ,
Access
9. ^ 379

. 1
32 766 .
,
. , -
.
(Update Retry Interval).
, Access -
, -
. 0 1000 .
(Number of Update Retries).
,
. 0 10.




, ,
. , , -
,
.
, , -
, ,
. -
, . .
, .
-
, .
,
, .

, , ,
.
, .
,
,
.
,
,
.
380 It.


, -
(Exclusive)
(Open).
,

, . -
Function sub, Visual Basic,
,
.
-
. -

.



,
, -
, .

(mdb) -
, ,
(mdb), .
, -
, , , , ,
, ,
, .
.
-
.
, -
.
-
(Database Splitter) ]
(ToolsUtilities).
.
9. Access 381

1
" " Users -
, . Users
. -
Users. -
. -
. "
"
. , -
.
,
. , -
-
, .


1. ?
2.
, ?
3. Windows 98
Windows 2000/XP Professional,
?
4. -
?
5. Windows XP
?
6. -
?
7. , -
.
8. -
?
9. Access?
10. Access ?
11. Access
?
12. Access -
?
382 !!,

13. Access ?
14.
,
Access?
15. Access?
16.
?
17.
?
18.
?
19. ,
?
20. Access
?
21. ?
22. ?
23. ?

1. .
2. .
3. .
4. , -
.
5. .
6. .
7. NetWare Novell Windows NT/2000/XP/2003 Server.
8. .
9. ( )
( ).
10. ( ).
11. .
12. .
13. A d m i n
: Admins Users.
9. Access 383

14. Admin
.
15. |3[ -
Admin.
16. |3 ( .
17. {3|.
18. .
19. -
, .
20. ][ .
21. , , , .
22. , .
23. , , .
10

Access
SQL-
Access
. -
Access, Microsoft FoxPro, dBase, Paradox Microsoft
SQL Server, HTML ,
, , -
, Microsoft Excel, Microsoft Exchange.
-
, Microsoft SQL Server.

Microsoft SQL Server



Access 15
. -
,
. ,
,
( ),
.
-
"-".
"-" -
: -
-. - -
-,
.
, -
. -
10. Access SQL- 385

. Access
SQL- . 10.1.


(Access) (Access)


(Access)

. 10.1. SQL-


, -
, .
,
. -, -
, .
, "-",
Microsoft SQL Server, Oracle, Sybase SQL Server .
SQL- .
"-" .

. Access SQL-.
-
. -
ODBC OLE DB. Access

ODBC. 2000, Access -
Microsoft SQL Server, -
386 II.

, ,
OLE DB.
Microsoft SQL Server ,
, , .
.
SQL Server .
.
. , -
, . -
, ,
, , , . . -

.
SQL Server , -
. , -
, -
.
, -
SQL Server,
. -
. SQL Server -
. -

. SQL Server
, , ,
.
Microsoft SQL Server
. -
.
SQL Sewer -
,
Microsoft.
SQL Server, Internet Information Server (IIS), -
. SQL Server
Windows NT 2000/2003 Server.
SQL Server Win-
dows NT Workstation, Windows 95/9S Windows 2000/XP Professional.

Microsoft SQL Server 2000 Desktop Engine


Microsoft SQL Server 2000 Desktop Engine -
Access "-"
10. Access SQL- 357

,
SQL Server .
Access,
. ,
,

.
Desktop Engine Microsoft SQL
Server 2000. Microsoft SQL Server 2000 Desktop Engine -
, Microsoft SQL
Server 2000, , ,
"-",
Jet .
Microsoft SQL Server 2000 Desktop Engine
Microsoft Data Engine (MSDE).
Microsoft SQL Server 2000 Desktop Engine Microsoft
Office \MSDE2000 - (
MSDE2KS3.EXE). SQL- -
Windows 98.


Microsoft SQL Server 2000 Desktop Engine -
-
setup.exe . MS-DOS.
MS-DOS -
, CMD <Enter>.
;
CD \sqi2ksp3\msde
setup.exe SAPWD="AStrongSAPwd"
setup.exe
C:Vsql2ksp3\msde. setup exe
:
setup.exe /upgrades? setup\sqlrun01 .msi SAPWD="AStrongSAPwd"

Microsoft SQL Server 2000 Desktop Engine -


(2 ) -
( 6),
, , -
, (
).
388 II.

Microsoft SQL Server 2000 Desktop Engine ,


Microsoft SQL
Server 2000 Personal Edition. MSDE -
, :
Microsoft Management Console (MMC), SQL Enterprise Manager -
, ;
' Microsoft
SQL Server Standard Edition.
Microsoft SQL Server 2000 Desktop Engine -
"-
". Windows NT
Windows 2000 SQL Server, . . Microsoft Of-
fice 2003, .

SQL
SQL- ,
Access, SQL
(Structured Query Language).
Access SQL .
, , , .
Access SQL.
, -
,
SQL. SQL, -
, , -
, | SQL (View|SQL View). ,
, SQL
SQL. -
SQL.
SQL -

"-". Access SQL Server -
'.
, SQL ,
' . ,
, , , -
SQL .
SQL
, SQL92 ANSI SQL,
10. Access SQL- 389


(ANSI American National Standards Institute) -
(ISO International Standards Organi-
zation) SQL86.
. , -
, -
, -
. ,
,
. SQL, -
,
.
SQL - , -
,
, -
, .
SQL-Server SQL,
Transact-SQL TSQL. Transact-SQL -
SQL.
, , -
, , -
, , .
Access 2002
ANSI SQL: ANSI-89, -
Jet SQL ANSI-92, -
ANSI-92 1; ANSI-92 -
Microsoft SQL Server.
Access -
,
Microsoft SQL Server, -
, ANSI-89 SQL, -
ANSI-92 SQL.
, |.
ANSI SQL- ,
SQL,
.
-
.
(SQL Access Group)
, SQL.
Microsoft
390 II.

(Open Database Connectivity -


ODBC). Microsoft -
, SQL.
ODBC.
Access ODBC
, SQL Server.
SQL Server Access,
2000, , ODBC,
OLE DB, .
SQL Server OLE DB . OLE DB
OLE- ,
. OLE DB -
, .

Access SQL Server ODBC


Access Microsoft SQL Server, -
, ODBC, -
, .
1. SQL SQL Server.
SQL ,
, , . -

.
. -
.
2. SQL Server.
Access
Access. , -
Access, -
Access.
3. SQL Server Access.
.
. Access
, , ,
Access.
Access
. ,
, Access, .
Access SQL- -
ODBC.
10, Access SQL- 391

ODBC
ODBC ,
, , -
. ODBC
. ODBC -
, -
, -
, , .
, SQL--
, .
ODBC
DLL.
Access SQL,
, ODBC.
ODBC Access ( Micro-
soft SQL Server), Access.
ODBC, -
, . Microsoft Access
32- ODBC, ODBC
I.
Microsoft Access. Access
SQL . 10.2.

Access

ODBS
( Microsoft)

ODBC
( )

SQL
( )

. 10.2. Access
392 II.

Access SQL-, -
, -
. 10.3.

ODBC SQL Server ODBC SQL Server

ODBC SQL Server

. 10.3. Access SQL-

, -
, (ODBC) (ODBC Data Sources
(32bit)) . Windows XP
(ODBC) -
).

D
, Windows -
(Start) .

ODBC (ODBC Data


Source Administrator) (Drivers)
10. Access SQL- 393

ODBC-. , -
SQL Server.
ODBC .
.
ODBC , -
ODBC (ODBC
Databases), -
.
(Save as Type) (Import),
(Link).


SQL-,
. ODBC , -
.
, Access, .
.
ODBC. ODBC -
,
ODBC -
.
DSN (User DSN).
,
,
DSN (System DSN)
.
DSN (File DSN)
, -
, . -
, , ,
. dsn.
,
.


-
DSN (User DSN). -
. -
ODBC (ODBC Data Source Administrator)
DSN (User DSN) (. 10.4). -
SQL Server.
394 II.

^ ODBC

1 ] j 0
DSN DSN j DSN


Microsoft dBase Driver (".dbf)
Excel Files Microsoft Excel Driver (* xls)
S Access D atabase Microsoft Access Driver (*.mdb]
MS Access Microsoft Access Driver (".mdb]
dBASE Microsoft dBase Driver (*.dbf)
: 1 Microsoft Excel Driver (' xls)

ODBC n are
.
.

. 10.4. ODBC

, .

Microsoft FoxPro VFP Driver ('.dbf]


Microsoft ODBC Oracle
Microsoft Paradox Driver (".db )
Microsoft Paradox-Treiber (*.db ]
Microsoft Tent Driver (".txt; * csv)
Microsoft Tent-Treiber i'.txt, ".csv]
Microsoft Visual FoxPro Oliver
Microsoft Visual FoxPro-Treiber
SQLServer

. 10.5. ,
10. Pa6ora_Access SQL- 395

(Add),
(Create New Data Source) (. 10.5)
SQL Server, .

. -
SQL- (Create a New Data Source to SQL Server) -
. 10.6.

Create a New Data Source to SQL Server

This wizard will help you create an ODBC data source that you can use to
connect to SQL Server.
What name do you want io use to refer to the data source?

Name: (

How do you want to describe the data source?

Description: [^

Which SQL Server do you want to connect to?

Server: jUBB-2tti:f

>
_ <^^. _J _,_^_J ^__^-_ ,^
||

. 10.6. SQL-

:
Name (), ,
;
D Description (), , -
,
;
Server (), SQL- , -
. SQL- -
, "local".
-
SQL- (. 10.7).
396 It.

SQL- , :
, , -
Windows NT/2000/XP
, .
.
With Windows NT authentication using the network login ID
( Windows NT).

;
SQL-
, .
With SQL Server authentication using a login ID and password
entered by the user ( ).
. , Windows, .

SQL- -
.

Create a New Data Source to SQL Server

How should SQL Server verify She authenticity of the login ID?

( Judith Windows N authentication using the network |ogin ID.i

{* With SJ]L Server authentication using a login ID and password


entered by the user:

To change the network libiary used io communicate with SQL Server,


click Client Configuration.

Client Configuration...

Connect to SQL Server to obtain default settings for the


additional configuration options.

< 1 >

. 10.7.

, -

(. 10.8).
10. Access SQL- 397

Create a New Data Source to SQL Server

-
*"1
,.j,fL " V
^ ~_
i Attach database filename:

Use ANSI quoted identifiers.


UseANSI nulls, paddings and warnings

< I > .

. 10.8. ,

ODBC Microsoft SQL Server Setup

A new ODBC data source will be created with the following


configuration:
Microsoft SQL Server ODBC Driver Version 03.81.9031

iData Source Name:


Data Source Description:
Server; UBB-2003
Database: SQL
anguage: Russian
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics; No
Jse Integrated Security: Yes
Use Regional Settings: No
Prepared Statements Option; Drop temporary procedures on
disconnect
Jse Failover Server: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Data Encryption; No

Test DataSdurce.-.

. 10.9.

398 II,

-
ODBC Microsoft-SQL Server
Setup ( ODBC SQL- Microsoft)
(. 10,9).
Test Data Source ( ), -
.
(. 10.10).

SQL Server ODBC Data Source Test

Test Results

Microsoft SQL Server ODBC Driver Version 03.81.9031

Running connectivity tests...

Attempting connection
Connection established
Verifying option settings
Disconnecting from server

TESTS COMPLETED SUCCESSFULLY!

Dl

. 10.10.

-
ODBC (ODBC Data
Source Administrator), DSN (User DSN) -
(. 10.11).
. ,
, SQL-
. SQL-
Access .
-
(User Data
Sources) (. 10.11) (Configure).

10. Access SQL- 399

, (. 106-
10.10).

^' ODBC

1 J | 0
DSN DSN DSN

:
_
dBASE Files Microsoft dBase Driver [*.dbf]
Excel Files Miciosoft Excel Driver (*.nls|
MS Access Database Microsoft Access Driver (".rndbj
MS Access Microsoft Access Driver (".rndbj
SQL Server
dBASE Microsoft dBase Driver f.dbl)
Microsoft Excel Driver (".xls)

ODBC
,
.

. 10.11. ""
SQL Server

-
(User Data Sources) (Remove).
ODBC ,
, -
.

SQL
SQL-
Microsoft SQL
Server SQL. SQL-
SQL .
, -
. Access,
, . .
. SQL-
400 II.

( Microsoft SQL Server-- Transact SQL), -


. ODBC, -
.

SQL
SQL Access
(Queries), (New) -
(New Query)
(Design View).
(Show Table) , .
(Query) SQL (SQL
Specific) (Pass Through).
SQL. -
, -
SQL, .
.


SQL , -
QBE SQL (. 4). -
, (View), SQL.

SQL
SQL
(Run). ODBC
(Select Data Source) (. 10.12).
, -
, . -
,
. -
, .
,

ODBC (ODBCConnectStr). -
,
(Properties). -
ODBC (ODBCConnectStr) ; ,
"",
, ;05=; .

ODBC.
10. Access SQL- 401

ODBC (Select Data Source)


{. . 10.12). , -
(. 10.13).

1
dBASE Files i! m
! Files ;: m
MS Access Database ' mi
MS Access .
.
dBASE Honi
Excel .

..

:

'. .
.
: - .

. 10.12. SQL

. 10.13. ODBC

, (Machine
Data Source) -

:
ODBC;DSN=rioCTaBKa;Description=Pa6oTa /UID^NVP;
DATABASE- SQL;IJ^GUAGE=pyccKMH;Network=DBMSSOCN;
Trusted Connection-Yes
402 //.

ODBC (ODBCConnectStr)
, ,
SQL- (. 10.14).

SQL Server Login

Server fllBB-2G03 ~
__^j OK

" Use Trusted Connection Cancel

Login ID: JNVP Help |

PasswQid:

^d
. 10.14.

ODBC
(ODBCConnectStr) ODBC.
.
, Access ODBC.

(Select Data Source)
ODBC (. . 10.12), -
. -
. -

ODBC (ODBCConnectStr).
.
ODBC (ODBCConnectStr) -
.
SQL
ODBC.
(Machine Data Source) -
. , -
,
, . -
.
(File Data
Source), .

SQL
SQL.
, -
SQL- " ". -
^. Access^ HaSQL - 403

, ,
, , -
.
SELECT . *, . _, . __
FROM INNER JOIN ON
(._=._) AND
(._= -_)
WHERE _>='01.06.2004|;

.
_*' 1
" ".
UPDATE
SET _=' '
WHERE _='';

.
__='001', _='01' _ = ' 0 0 5 ' __0'.:
500.
UPDATE
SET _ =500
WHERE _='001 AND _='01' AND _='005';

.
, .
INSERT INTO (_08,HAMMJTOB,,,_]
VALUES
('017','',200,'',0.1);

2 , -
Name_Pl Name_P2.
CREATE TABLE 2 ( [Name_Pl] [char] (3) ,
[Name_?2] [char] (2) ) ;

, -
, (Returns Records) -
. -
(. 10.15).
(Returns
Records) (Run) .
, , -
(View).

14 835
404 II.

Microsoft Office Access

\ , ' ' (ReturnsRecords) '',


I. .

. 10.15.

SQL-
Access SQL-
. ,
, Access.
-
Access , ,
Access. -
, .



| | (File|Get External DatajLink Tables).
(Link) (. 10.16),

ODBC (ODBC Databases).
(. . 10.12) ODBC,
.
, (. . 10.14), -
.
(. 10.17) ,
.
,
. 10.18.
,
(. 10.19).
.
,
.


, , -
,
10. Access SQL- 405

-
.

)Adobe PDF .
U- |^)
:
QMoa
,y|jdbl.mdb


;
J
: Microsoft Office Access (*,mdb;*.mdaj*.mde)
HTML (*.html;*.htm)
OuttaokO
Paradox (*.db)
(*.txt;*.csv;*,tab;*.asc)
Windows SharePoint Services 0
ODBC Q

. 10.16.

.
!
dbo,
^dbo.
Idbo,
dbo.
dbo.
dbo.
dbo,
dbo.nOCTABKAJiriAH'
dbo.
dbo.Table2
i dbo. f~

. 10.17.
406 II.

.,. OK
'(_
Ctrl-Break.

. 10.18.

01
HGM
KOjfCK

_


, ,
.
.

. 10.19.

-
Access
(. 10.20). , ,
gJlPi. ,
, SQL-.
, , -
. -
-
.
, ,
.
.
10. Access SQL- 407

^^^ | : ( Access 2002 - 2003) flTjf ]( X"

.^ ^ ^ | X ! ^ IV [] !"!


^3 j ^
t3j
Jip

,13]
\* dbo_HAK
i [ !_
* + dbo_nOKynATEnb
* (__
2
!*^ !_
^
^ dbo_TOBAP
3
1 ~" "1
i jjjjl *tl !

"3
S3
3
31
!3
3

< ; >

. 10.20. ,


, (. 10.21).


/:

'| !
_ _
V


-;: :-^'.,
!
XKUhOt ftit
5 " sag L -- ---.'-'.

: --

. 10.21.
408 .

,
,
.
,
,
| (EditjDelete) . -
. . 10.22.

Microsoft Office Access


1
, 'dbo_ .

, 'Microsoft Office Access'


, .

. 10.22.


. -
.
. , -
, . -

. -
. ,
dbo. :
ODBC;DSN=nocTaBKa;Description=Pa6oTa TOBapOB;APP=Microsoft
Office 2003;WSID=UBB-2003;DATABASE=nocTaBKa SQL;LANGUAGE=
;Network=DBMSSOCH;Trusted_Connection=Yes;TABLE=dbo.


(Linked Tables Manager), -
, -
(Database Utilites) (Tools).
,
.
. 10.23 ,
.
SQL-
ODBC.
, 1, -
Excel, .
10. Access SQL- 409

,
.
, .
,
.

1
fit"
:

(5=;= SQL,)
(=;5=951;)
(=;5= SQL;)
1_ (02=;5= SQL;)
(__ (1;5=501-;)
;;
_ (=;5=|_;)
(05=; DAT ABASE= SQL;)
1 (E:^ocumentsardS8ttingsWVPVulciM\_.1\11)

" [

. 10.23.


.
, SQL-.
. 10.24, 10.25 , -
, -
1_7 !_, , -
Access
,
G
SQL-. ,

. SQL-
, .

. -
Access (. . 10.20),
, _ dbo_o<r.

410 II.

SQL- -
. ,
,
.
(Append Query) (. 10.26).
(. 10.27) , . -
-
,
!_.
.

* : ,. , (V jjujfxj

RH^^Bi
U'MlMMinMiim


|,_ v [ |_
IHH V }_ |_
_ *-* 1_ 1
|_ ' | _ ^~_
/

<
: _ . ^

: dbo_nOKynATEnb db . dbo ^.
:
: 0 0 0 0
: [ ]
:
<; X

. 10.24.

: ^
_ | J30r _
111 01.01.2004 4 6 " 2,00.
222 29.12.2004 17 1 8,QOp. j
222 29.12.2004 19 41 .. ;
J_ 777 14. 10.2004
1: 4 _] | ' -| 4

. 10.25.
" "
10. Access SQL- 411

^ :.

_
_

_

: ,*
:
:
; dbo_HAK .
:

, 10.26.

,,.-
; ^_

"'
?" :

. 10.27. ,

-
dbo_OTrPy3KA .


SQL- Access
SQL
. -
Access -
. -
412 .

. -
.

( | (File Get External Datajlmpon).
(Import) (Files of type)
ODBC (ODBC Databases). , -
, ,
(Import Ob-
jects) .
Access.

Access
SQL-
SQL-
Access.
Access ODBC
| (FilejExport). , -
. (Export) (File name) -
. -
ODBC (Save as type)
ODBC (ODBC Databases).
,
(Save), , -
. 10.28.

: '!
|

ODBC

. 10.28.

ODBC, -
, -
. -
, ,
.
, .
.
10. Access SQL- 413

)
, -
- . , -
.


1. Microsoft SQL Server?
2. Microsoft
SQL Server?
3. Access "-"?
4. "-" ,
Microsoft SQL Server?
5. -
"-"?
6. Microsoft SQL Server ?
7.
"-"?
8. ?
9. , Microsoft SQL Server
?
10.
Access?
11. ,
Access Microsoft SQL Server?
12. , -
ODBC?
13. ODBC?
14. ODBC Microsoft SQL Server?
15. ODBC?
16. ODBC.
17. 0
18. ?
19. -
?
20. ?
414 II.

21. ,
?
22. -
?
23. ?
24. -
?
25. ?
26.
?
27. -
?

1. "-".
2. Windows NT/2000/XP Server, NT Workstation, 2000/XP Professional
Windows 98.
3. .
4. .
5. .
6. .
7. .
8. SQL.
9. Transact-SQL.
10. ODBC.
. ODBC.
12. ODBC.
13. .
14. SQLServer.
15. , , .
16. .
17. .
18. |3 SQL|K (QueryjSQL Specific|Pass Through).
19. ODBC (ODBCConnectStr).
10. Access ^ SQL- 415

20. ;=;

21. ODBC (ODBCConnectStr).


22. .
23. | | (FiIe|Get External DatajLink Tables).
24. .
25. .
26. ) [ (Tools|Database
Utilites|Linked Tables Manager).
27. .
11

Access
Microsoft SQL Server
Access 2000 ( adp Access Data Project
) ,
Microsoft SQL-, -
, Jet.
SQL Server
OLE DB.

Access 2000
Access "-",
Access
SQL-.
, . Access
, -
, .
Access Access (adp).
, : , ,
HTML- , .
, Microsoft Access
. , , , -

SQL- Access.
SQL-, Access,
,
Access .
Access , -
Access. Access , -
Access, : , ,
. .
?J. Access Microsoft SQL Server 417

SQL Server, , -
, SQL-
, , , -
SQL. -
, , -
Access,
.

OLE DB
OLE DB , -

, ,
, .
OLE-,
. OLE DB , -
, , : Access, Visual
Basic. , ,
, : Microsoft OLE DB Provider for
Microsoft SQL Server (. 11.1) Microsoft Jet 4.0 OLE DB Provider
Microsoft Access .


/ / .1 .

j j ' '
: Access 1 Access |

'1
fJ h-r
OLE DB Provider <->Lt ^roviaer
for SQL Server
for SOI Rprver

SQL-

/

OLE DB Provider
! SQL-c 1
rnorr
" for SQL Server
~"1
11
crt 7>,
\ j
L J Access

. 11.1. Access SQL-


418 II.

Microsoft Office Microsoft Access -


OLE DB-:
OLE DB Provider for SQL Server;
OLE DB Provider for Microsoft Jet 4.0;
OLE DB Provider for Oracle;
OLE DB Provider for ODBC Drivers.
Visual Basic for Application OLE DB -
ActiveX ( ado).
, OLE DB -
, (Data Link),
:
1. Windows.
2. . -

.
3. , -
DDL- (Universal Data Link).
, ,
.
4. udl, <Enter>.
5. ,
. udl
. .
6. UDL-,
. (Data Link Properties).,
(Provider)
OLE -(. 11.2).
7.
(Connection). -
UDL-.

. Access -
Microsoft SQL Server, ,
, , .
Microsoft OLE DB Provider SQL- -
. -
Access. , udl.
Access -
, -
11. Access Microsoft SQL Server 419

-
, OLE DB.
Access, SQL-, -
UDL-.
(Data Link
Properties), Microsoft OLE DB Provider
SQL- .

(Data Link Properties).
Access udl.

j ] :

OLE DB
MediaCatalogDB OLE DB Provider
MediaCatalogMergedDB OLE DB Providei
MediaCatalogWebDB OLE DB Provider
Microsoft ISAM 1.1 OLE DB Provider
Microsoft Jet 4.0 OLE DB Providei
Microsoft OLE DB Provider Foi Data Mining Services
Microsoft OLE 08 Rovider for DTS Packages
Microsoft OLE DB Provider for Indexing Service
Microsoft OLE D Pr vider f or I nternet_Pu blis hin g

Microsoft OLE DB Provider for OLAP Services 8.0


Microsoft OLE DB Piovider for Oracle
Microsoft OLE De Piovider for SQL Server
Microsoft OLE DB Simple Provider
MSDataShape
SQL Server Replication OLE DB Pfovider foi DTS
OLE DB

01

. 11.2. OLE DB-,

Access
Access
, Access.
420 II.

, , SQL-
,
, .


, -
Enterprise Manager.
. , ,
SQL Servers Databases.
Logins , . -
Action|New login. -
Properties.

Microsoft SQL Server 2000 Desktop Engine MSDE,


Access .
Microsoft SQL Server Service Man-
ager. , -
Start/Continue (. 11.3).

SQL Server Service Manager

Server:

Services:

II I Pause

stsp
* J
Auio-stail service when 05 starts

Running-\VUBB-2003-MSSQLServer

. 11.3. Microsoft SQL Server Service Manager

Access, ,
Microsoft SQL Server, (New) -
:
(Project Existing Data),
;
(Project New Data), -
.
11. Access Microsoft SQL Server 421

(New)
| (File(New).
(File New
Database) (. 11.4), -
. -
Microsoft Access (Microsoft Access Project) ( -
adp).


: "3
',

; jadpl.edp

: [ Microsoft Office Access (*.adp)
i
. 11.4.
Access

(New),



-
Access
(Data Link Properties) (. 11.5), -
, , -
.
422 II.


32-
IP- , SQL Server. -
: 10.135.200.15.

SQL-, -
(. . 11.5).
. -
(Select
the database on the server), .

j | j

SQL Seiver :
1. :
[^ '""Vj
2. :
*~~ Windows NT
** :
: IN V
:
" *
:
[ jr]
:

. 1

. 11.5.

,
(Test Connection). -
, ,
Access (. 11.6).
, , -
11. Access Microsoft SQL Server 423

(Microsoft Access 2002 2003). Access -


: , , . -
.

H adpl ; - ( Access 2002 - 2003) (5~HS


l.jjOTjcpbiTb *^ _] | > -* "||

l-^'
J : "J
J
^
J3
J'j
J
^ 3 _
i$ J

**j|

J:'
!
. ^

L^J

i 1

. 11.6. Access

(File)
(Connection), -
(Data Link Properties) (. . .2).
:
, Access
.
-
, . . .



Access
, .
Access
424 II.

. adp,
mdf Idf.
-
(. . 11.5)
SQL- (Microsoft SQL
Server Database Wizard). (. 11.7) ,
, -
. , ,
, -
. Windows.
.
, .

Microsoft SQL Server

5QL Server .
[UBB-Z003

,
CREATE DATABASE .

[7

SQL Server.
[

>

. 11.7.
SQL- Access

-
. ,
. 11.8.

Database . -
11. Access Microsoft SQL Server 425

, , Access, -
SQL.

Microsoft SQL Server


''...

. 11.8.


,
.

Access
Microsoft SQL Server 2000 Desktop Engine
Microsoft SQL Server 2000 Desktop Engine,
Microsoft SQL Server 2000,
,
. -
-
.
-

SQL Server, SQL Transact-SQL.
,
.
MSDE , SQL-,
SQL-:
SQL-;
Windows. -
Windows ,
SQL Server ,
, , -
.
426 II.

Access Microsoft SQL Server 2000


Desktop Engine
,
Windows.
Access Microsoft SQL Server 2000 Desktop
Engine
(SA) ,
. SA -
SA .


MSDE
.

SQL Server (SA) -


,

SA .
SQL Server (SA) Access
| .

(SA) (. 11.9). Microsoft SQL Server 2000 Desktop
Engine Access
Windows NT/2000/XP,
.
(SA)
Access .
SA .

.adpl

: Microsoft SQL Server

; OS. 00.0194

: UBB-2003

: :
'^?1?. ?.?!?! (SAJj

. 11.9.
1 ^. Access Microsoft SQL Server 427

, Access,
( 08 Microsoft SQL Server 2000),
, .

|3] -
.
-
. ,
(. 11.10). -
.

. 11.10.

, ,
, .
Access -
Microsoft SQL Server.
] (. 11.1),
Microsoft SQL Server 2000 Desktop Engine -
.

11.1. !


(dat)
SQL- SQL Server
SQL- SQL Server
(dat)
SQL SQL Sewer
SQL Server
SQL Server
SQL Server (mdf I
428 II.



Access -
"-
",
.
Access ( mdb) "-
".
, Microsoft SQL
Server, Access ( -
adp). ,
Access , -
,
.
Access,
.
Access ( mdb)
) | -
SQL Server (Tools|Database Utilities|Uprising Wizard). -
(. 11.11),
SQL- .
SQL Server.
(. 11.12) SQL-
. -
: , -
, Windows NT/
2000/, , -
SQL Server. SQL Server.

Access SQL Server (. 11.13).
(. 11.14) Jet, -
SQL Server. (Use triggers),

, Access,
.
, Access (
mdb), Access "-"
(Create a new Access client/server application) (. 11.15). -
( adp) ,
Access, -
5^. Access
Access Access.
11. Access Microsoft SQL Server 429

SQL Server


Microsoft Access Microsoft SQL Server.

SQL Server
.
.

'
(* |

""
.

>

. 11.11.

SQL Server
SQL Server ,
iu88-2003

,
CREATE DATABASE .

SQL Server,
[ TosapoBSQL

4. > \

. 11.12. ,

430 II.

SQL Server
/ SQL Server.

: SQL Server:
j:

>
hf
" - ^^~

^_
< _

~!

: [

1 < | > . . . |

. 11.13. Access
SQL Server

SQL Server

5QL Server ^
,

?
_ _.
I?
F/ F/

DRI (? [

?
? [, -J
| *

< >

. 11.14. ,
SQL Server
11. Access Microsoft SQL Server 431

-
Access . -
SQL Server, -
SQL Server.
,
Access ,
SQL-.

SQL Server

SQL Server,

** Access "-"

1
ADP: ;\;_5.1 ' :1
I SQL Server

" |

< ] >

. 11.15. ,
Access

, -
(No 'application changes).
SQL Server (Link SQL Server tables
existing application) -
,
"". , Access -
, -
.
(. .16) -
(Finish).
, -
, SQL Server,
432 II.

, , Access.
(. 11.17).

SQL Server

5QL Server

.

ADP ?

(* [ ADP
MD6

<

. 11.16.
SQL Server

'1,..

: 4/5

. 11.17.

Access -
Microsoft SQL Server.
Access,
Access SQL Server 2000 :
, ORDER BY
, ;
11. Access Microsoft SQL Server 433

. -
^
NOCOUN? , ;
, -
ORDER BY,
. ,
ORDER BY, PERCENT;
, , -
, Access, -

.

, -
, .
.

Access SQL-
Access -
Access .
. |
] (File|Get External Data|Import). -
Access. -
. -
, , ,
, Access.
-
, -
. , .
, Access, .
, .
, SQL Server,
SQL, Access
OLE DB ODBC.
-
, [ ! -
(File|Get External Data| Link Tables). -
, .
, Access , -
,
, OLE DB,

434 II.

Microsoft SQL Server. SQL Server, -


, SQL-.

( ode) , -
, . -
. , .
,
.

SQL-
Access (adp),
Access (mdb), (Database Diagrams).
: , , -
. -
. -

Access, .
: , , , , -- -
Access Access.
-
Access.

. -
.
(. . 11.6) .
, -
, , Access
Access. ,
, , -
. ,
Access, . -

SQL Server.
Access
.
-
SQL-. . 11.18
SQL-.
, , -
11. Access Microsoft SQL Server 435

(General) (Lookup) (Columns)


(Lookup).

: (
] ] Null |
[ ^ _ char 5
nvarchar 25 '
money V
nvarchar 8 V
1
f 8_ 4 V-
image
16 ^
bit 1 V v

L Y ; - . - - >, : - '


) 2
i

>

. 11.18. SQL-

, Access, -
, . -
, Access,
.
,
(Properties). . . 11.19
(Relationships).
-
, ,
, ,
.
(Selected relationships).
(Properties) (. 11,20)
. -
(New).
15 835
436 II.

(Constraint expression) ,
, , : [_]<40.
(Constraint name)
_, , _,
.
: []>
1 []<=2000 2.

| |

; ;

: [J? ___ ; V

: . JFK

_ _]_

[ !

INSERT UPDATE
1

. 11.19.

, ,
, , (Selected
constraint).
,
Access, .
(Primary Key),
11. Access Microsoft SQL Server 437

.
(Indexes/Keys) .
, . -
. . 11.21 -

(Indexes/Keys). ,
_ - .
(Selected index), , ,
.

[]

j ] 1, 1


ICK
i '| 1.-. i ~"
- v j1

: [___

:
[ _<40

1?
1
INSERT UPDATE

. 11.20.

/, , -

(View).
438 II.

| j ] IJJJ.

:
1__
:
:

; IX

( /V
' j !

V.

lpR1HARY
: . __. ;.:

" UNIQUE . ;
|f" ; ] %
! (* " ;

CLUSTERED
~

. 11.21.

(. .22).

0 EJE li
+ 01 17LG 587,00 5,00%
* TQ02 FDD 3,5 363,00. 6.00%
* .HDD Maxtor 20 1 280,00. 16,00%
* MiniTov 16,00 6,00%'
* 005 CD-ROM Panat 1 153,00 30,00%
; |_]

. 1 1 .22. Access


.
11. Access Microsoft SQL Server 439

, (. 11.23).

.
, , -
. :
.
.

.
, 0.

: 10000

. 11.23.


-
, .
,
, , , , .

, -

. , ,
. -
.
.
Access (New),
(Database Diagrams).
, Access,
(Add Table) , , .


. (Create Relationship)
(. 11.24) .
440 It.

, -
.

!X '

:
__

_ _!JHOMJCr .

15*

INSERT UPDATE
"
^ !

. 11.24.

, -
, . 11.25.
.
, ,
. -
.
.
. -
(. . 11.25)
(Column Properties).
-
(Properties).
(Relationships) .

, -
11 Access Microsoft SQL Server 441

.
.

*
_ ,,-,

_
_


_ char
_ char
_ date time
J
_ char
money

-)
1

. 11.25. SQL-, Access

, -

, .
, -
(Add Related Tables), -
.
(View) ,
.

.
442_ II.

, -
:
,
SQL SELECT, ;
, , -
SQL INSERT, UPDATE DELETE, -
;
,

.

. , -
. ,
.
. -
.
(View) (. . 11.27),
, Access,
: , ( -
) SQL. , ,
, .
, ,
.
.
SQL SQL, ,
Access, .
SQL
. SQL,
. -
,
. , SQL ,
, .

(
Microsoft SQL Server 2000,
.
11. Access Microsoft SQL Server 443

-
:
G (Diagram) -
. (. . 11.28)
;
(Grid)
. .
, -
, , ;
SQL (SQL)
Transact-SQL;
SQL (Verify SQL Syntax) -
SQL ,
.
(View) Access, -
SQL- Enterprise Manager, -
.
, Access
, .
,
, "
" 2004 .
1. SQL-
(New) (Queries) Ac-
cess. (New Query)
(Design View).
2. (Add Table)
.
3. ,
,
, .
, _, -
,
.


, -
, . . -
.
444 II.

-
INNER JOIN, <.
,
(. 11.26). ,
, . -
.
, (=),
,

: [ {

: dbo.._ [*f ,


/X " .

. 11.26.

(All rows from ), -


LEFT OUTER JOIN, ,
, -
, , -
.
( rows from )
RIGHT OUTER JOIN,
, , -
.
FULL
OUTER JOIN, [g | -
, ,
.
11. Access Microsoft SQL Server 445


.
1. , ,
.
2. (_) -
(Criteria) =' 1 , -
(_) >=01. 01.2004. -
.
3. (Alias) .
. , -

, , -
, , . .
4. SQL
SQL.
. 11.27.


SQL (,
) ,
. -
, (
) ( ): ,
5_.. _...
. , Microsoft
SQL Server 7.0
, .
SA dbo.

5.
(Run)
(Datasheet View), (View).
(Open).
,
., , -
.
, . ,
.
. 11.28 , -
, -
: _, _,
_ _.
446 II.

! ;
'

( )
;

V
_

,..
HAMMJ10K V = N' '
_ V
V"
HOMJOr s/
^ \/ >= '01. 01. 2004'
_ \/
< >
SELECT dbo. , , dbo. . , dbo. . ,
dbo. . _, dbo. . AT _, dbo, .
FROM dbo, INNER JOIN
dbo. ON dbo, . = dbo. ,
WHERE (.. = ' ') AND
(dbo. . _ >= CONVERT(DATETIME, '2004-01-01 00:00:00', 102))

. 11.27.


, _ _,
. (Group By)
_ Count, ^ sum.
,
, ,
.

"Exprl" "2" ( (Alias)). -
" " " ".
,
.
, , -
(All rows from
).
11. Access Microsoft SQL Server 447


SQL.


SQL .
:
SELECT
FROM dbc. RIGHT OUTER JOIN dbo. ON
dbo.._=.._

. 11.28.

1 2 ; :
;

'

...* ( ! '
_

'_ = >

.,* ( )
JJJTJ

1 " 1 ""' ^_ Z

; -
1-
,;_
' jor l\ V

>
[ 1
_ .
_ . S/
_ [ ] V 5um
_ [ ] Count
v
< >
5EL 100 PERCENT dbd. . HAHMJIOK., dbo, , ,
SUM(dbo. ,_) 5 [ ],
COUNT(dbo. . _) AS [ ]
>RC ) dbo, RIGHT OUTER JOIN
dbo. ON dbo. . _ = dbo. . _
GR( XJP BY dbo. . , d . . _
OR DER BY SUM(dbo. , ) DESC

. 11.28.

, -
(Run).

.
448 II.

.
INNER JOIN, ,
.


-
.
, -
SQL UPDATE, INSERT DELETE. -

Transact-SQL, SQL Server -
.

. -
-
,
. ,
, .
.
-
, , ,
. -
, .
Access
(Open) .
, .
, SQL SELECT,
. -
, SQL, -
SQL, -
SQL SELECT
. Access
(Queries) (New).
(New Query)
(Design Stored
Procedure) ,
(Create Text Stored Procedure).

(Query Type).
(. 11.29),
11. Access Microsoft SQL Server 449

-
.
(Query)
.

..,

.,,

. 11.29. ,

(Make-Table Query)
, .
SQL SELECT. . .INTO.
(Update Query)
.
SQL UPDATE.
(Append Query) , -

.
SQL INSERT. . .SELECT.
(Append Values Query)
.
SQL INSERT INTO. . .VALU:-:S.
(Delete Query)
. SQL
DELETE.

SQL Server . -
, . . , -
FROM,
SELECT. SQL Server
, -
.
450 II.

-
.
, -
SQL. -
, -
, ,
Microsoft Access.

(New Query) Microsoft SQL: -
.


-
, .
(Criteria) -
.


* ( )
JKOAJ10K
* ( CTuitiLibij
/
0_
IV

<

' |
_ =
J1OK
V/
_
^
_

SELECT dbo,.HAMMJlOKj dbo., , dbo,.,


dbo.,_, . . AT ^, dbo*. . _
FROM dbo. INNER JOIN
dbo. ON dtro.,_ = dbo,,_
WHERE .,_ = ) AND
(,._ BETWEEN @ AND @)

. 12.30.
11. Access Microspft SQL Server 451

"@".
"@" ,
(Enter Parameter Value), -
.
WHERE.
,
, . -
. -

(Criteria) _ =@ {. 11.30). -
. -
-
: BETWEEN @ AND @.
,
. 11.31.

|1|] [? <]

-Vj 1

"'

. 11.31.

-
, SQL SELECT.


SQL
(Create Text Stored Proce-
dure) (New Query), -
(New).

(. .32).
CREATE PROCEDURE -
. -
, , , -
. -
"@". ,
452 II.

. , -
.
.
,
, OUTPUT.

.
EXECUTE.
,
, ,
-
.
/ * . . . * / .
SET
NOCOUNT ON */. AS
SQL. RETURN . -
CREATE
ALTER.


, ,
CREATE PROCEDURE
SELECT. SET NOCOUNT
.
SELECT, .

? : L, }|
CREATE PROCEDURE "?"

^parameter! datatype = default value,


(SparameterZ datatype OUTPUT

/* 5ET NOCOUNT ON *j
RETURN

. 11.32. SQL

SQL
SQL (Insert SQL) ,
. -
11. Access Microsoft SQL Server 453

, -
.
SQL Server ,
, , -
, .
. 11.33 ,

@! set.
@.
SELECT, -
, .
-
. , ,
. -
,.

:
ALTER PROCEDURE -1
@ nvarchar (20),
@1 decimal OUTPUT
AS Set @1=(51. 5(, )
FROM INNER JOIN ON
, _ = ._
GROUP BY , HAMMJIOK
HAVING (,HAHMJIOK = ))

. 11.33.

. .34 , EXECUTE
4.
(, ' 1 ,
,
.

:
ALTER PROCEDURE
@ money =0
AS EXECUTE 4 ' ', OUTPUT
UPDATE
SET _ = @
WHERE _= ' '

. 11.34.
454 II.

UPDATE _
.
. 11.34 ,
. .
SQL. -
.


1. Access?
2. Access?
3. ?
4. , ?
5. , .
6. ?
7. Access
Microsoft SQL Server?
8. , OLE DB SQL Server -
?
9. Access - UDL-
?
10. , ?
11.
?
12. -
?
13.
Access?
14. -
| | (File|Get External Data|Import)?
15.
Access Microsoft SQL Server?
16. ?
17. ?
18. Microsoft SQL Server
?
19. Microsoft SQL
Server?
11. Access Microsoft SQL Server 455

20. ,
?
21.
?
22. , ,
, ?
23. Access Microsoft SQL
Server?
24.
?
25. ,
Alias ?
26. -
SQL?

1. Microsoft SQL Server.


2. , , HTML-, .
3. .
4. SQL Server.
5. , , , .
6. .
7. OLE DB.
8. Data Links.
9. .
10. adp.
11. IP-, , -
, (
Windows), .
12. | (File|Connection).
13. .
14. , .
15. .
16. .
456 II.

17. .
18. .
19. .
20. .
21. .
22. .
23. .
24. INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER
JOIN, FULL OUTER JOIN.

25. .
26. .
12




, -
. Microsoft Office 2003
, , , -
, Web-
, ,
, , , Internet Explorer, -
, -
.
.

. Access
, ,
Access , .
Web- -
HTML (Hypertext Markup Language).
Web-. HTML ,
Web- -
, , -
.
HTML HTML (DHTML)
, Web- -
, .
HTML, Web-
Web-, -
.
-
,
.
458 It.


XML (Extensible Markup Language ).
XML -
. -
.
XML Web-
, , HTML. -
.
XML , .
XML Access. Access
Jet SQL Server XML
, -
, XML. -
XSL, , -
.

. , , -
Access, , -
.
XML .

Web-,
Access
Microsoft Access Web- .
-
HTML, HTML- -
, , . ,
Web- . -
. Web- -
.
,
.
, -
, IDC/HTX
ASP. , .
Web- , -
.
Web- Microsoft Internet Informa-
tion Server (IIS),
ODBC. , HTML -
^^^ 459,

Web- . HTML -
.
HTML- Web-
, HTML 3.2 ,
.
Web-,
HTML.
, , , , ,
, Access SQL Server, -
, -
Access 2000. Access,
, -
. . -
,
Microsoft Excel. HTML-
, Access. , -
, .
,

Web- --
.
Web- -
DHTML 4.0 . ,
DHTML, Microsoft Internet Explorer
5.0 .

Web-

Access Web-
. , ,
.
HTML-. , -
, -
, -
ODBC.
, . Web-
-
. HTML ,
,
460 II.

. ,
.

Web-
Web-

Web- -
.
1. , ,
| (File|Export).
(Export) .
2. : ' 1 (Export Table <
> ) (Save as type)
HTML (*.html;*.htm) (HTML Documents (*.html;*.htm))
(. 12.1).

: '*
: jj Test a* -
ATEflb.html

: I "71 * JCogpaHWTb !
"" '
: [ HTML (*. html;*, htm)

. 12.1.

3. , -
.
4. (File Name) -
. .
12. 481

5. (Save formatted) -
, .
, -
.


, HTML,
, .

(Save formatted)
(Autostart).
Internet Explorer , -
, -
.
6. ,
(Export).
7. (Save formatted), -
HTML (HTML Output Options)
(. 12.2). , HTML -
-
.

HTML
" HTML:;
[ 1 ,.. |
:
f*
*""
(UTF-8)

. 12.2.

. 12.3 12.4 Internet Explorer -


HTML, -
.
HTML
.
,
HTML. , ,
. , -
462 II.

. , HTML- , -
, ,
. ,
HTML . -
HTML , -
Internet Explorer | HTML-
(View|Source).

'3 - Microsoft Internet Explorer -[ ]



** ! '. ' : %
:\Test\TQBAP, html *


";


001 17LG 587,00.
002 FDD3.5 . 6%
HDD Maxtor'20GB 1 280,00. 16%
TD04 MiniTower j 916.00 8%
POTOBQ

. 12.3. HTML-,

-3 - Microsoft Internet Explorer - [ ]



-^j -'*;. ... >w *] j] !-''; .) -! i$
\; j^] O:\Test\TOBAP.html

T001 17LG 6587,00. ,0,05


363,00. 0,06
; HDD Maxtor 20GB 1280,00. :Q,16
!004 ; MmiTower 916,00. 0,08
-J/

. 12.4. HTML-,

12. 463


< ="">. . -
, : < HREF=". ./ .">, -
: < HREF="E:/_2004/Test/ .(3">. -

Web- .
Web-, ,
.
.
HTML. , -
. , -
, . <BODY><!--
ACCESSTEMPLATE_BODY--X/BODY> -
, ,
.
<TITLE><!ACCESSTEMPLATEJTITLE></TITLE>
.
, : -
, , .
-
:
<IMG SRC= ". gif"XHRXBR>
<FONT SIZE-4 FACE="Arial" COLOR=#FFOOOO>3flECb
</FONT> <HR><BR>

<HR> .
, ,
, , HTML-.
HTML- ,
.
Web-
. ,
, , .
HTML- , -
. :
<IMG SRC="/. gif"><HR><BR>

, -
HTML (HTML Output Options)
HTML (HTML Template) (. 12.5).
464 II.

(Browse)
. -
.

HTML
fv* ||6 61:|
[D! \TEST\PROBA. HTM ,..

:
.....

. 12.5.

' - Microsoft Internet Explorer


iyj -"AMI, ' 0- [ ,2] >'i /-' "- ^J1

D:\TE5T\TOBAP, html V,! j





6587,00.
. ;
HDD^Maxip2EGI3 1 280,00.
' MiniTower 916.00.

. 12.6. Web- ,

12. - 465

, 12.6 Web-,
:
<HTML>
<HEAD>
<TITLE><!--ACCESSTEMPLATEJTITLE></TITLE>
<IMG =" . gif "><HRXBR>
<FONT SIZE=4 FACE="ARIAL" COLOR=#FFGOOO>PEKBH3MTb!
</(><><>
</HEAD>
<BODY>
< ! ACCESSTEMPLATE_BODY>
</BODY>
</HTML>

Web-
Web-, ,
. ,
, .

. -
Web- -
. ,
\ .
Web- (. 12.7)
, , -
. ,
-
.
Access Web-
,
. -
Web-,
. -
, ,
Web-, , -
. 12.8.
.
466 II.

& :

^^^jb *

* 1 - _ ; *
/ 00 1
|_ , _ _ _
| L, ^ CPOKJIOCT : _
|_ = _ _
;_ v VI ^

:<' - ' >


: _ _
: 2
:
: 0 0 0 0
: [ ]
: V

. 12.7.

- Microsoft Internet Explorer Q(6j[X j


:

U,* ' "" L_J .*!J "- * f i i* UUCP.


. .\^..-,

: ;. ]0] D:\Vest\3aKa3aHo.html X . &3 : ^ -

| ^ |_|
FDD3.5 1 11 501
FDD 3,5 |1 11 10
FDD 3,5 ! 80
V

S^3 ^

. 12.8. Web-,

Web-
Web-
, .
Web- ,
.
, -
. , -
12. 467

SQL, ,
. (. . I2.1) , -
. -
.

Web-
Web-.
HTML-,
,
Web-.
, : . html 2.11 . .
HTML, ,
: ,
, .
, , -
Access :
< HREF="<! ACCESSTEMPLATE_FIRSTPAGE-->''>FIRSTPAGE</A> -
;
< HREF^"<! ACCESSTEMPLATE_NEXTPAGE-->">NEXTPAGE</A> - 6 -
;
< HREF="<! ACCESSTEMPLATE_PREVIOUSPAGE-->">PREVIOUSPAGE</A> --
;
G <A HREF="<! ACCESSTEMPLATE_LASTPAGE-->">LASTPAGE</A> -- 6 -
.

Access :
< ! ACCESSTEMPLATE_PAGENUMBER >

-

.
<HTML>

<TITLE>< ! ACCESSTEMP1ATE_TITLE~>< /TITLE >


<IMG 5.=".1'>
<FONT SIZE-4 FACE="ARIAL" COLOR=#FFOOOO>
</FCNT><HR><BR>
</HEAD>
<BODY>
< ! -ACCESSTEMPLATE_BODY >

16 . 835
468 II.

</BODY>
<HRXBR><FONT SIZ,E="4" FACE="ARIAL" COLOR="#FFOOOO">CTpaHHua</FONT>
<! --ACCESSTEMPLATE_PAGENUMBER><KRXBR>
<A HREF-"<!--1_~->"></>
<A HREF="<!ACCESSTEMPLATE_PREVIOUSPAGE~>"> </>
</HTML>


001
17LG
6 557, 00.

5%


2004
001 -' 20.01.2004
: 1 : 2
2004
01 001 10.032004
01 001 11.032004
001 001 ; 25.03 2004
001 24.03 2004
: 4 : 19
2004
TG01 / 27.04.2004
: 1 : 2
Z3

15 2004. 1 10

1)

. 12.9, Web-

(. 8) HTML- -
.
I.
[.
12. 469

2. -
HTML
3. , .
4. .
5. ,
.
6. HTML -
HTML .
, , Access -
.
Web- 1, -
, . 12.9.
Web-
, .

, ;
, .
.

Web-
HTML-, Web-
. Access
, ,
HTX/IDC ASP.
ODBC.

Web- HTX/IDC
Web- HTX/IDC,
.
1. , ,
, |.
2. Microsoft
IIS 1-2 (*.htx;.*.idc).
3. , -
. -
, .
4. . HTX/IDC -
.
470 II.

5. IDC (. 12.10)
ODBC.
DSN Web-
(Data Source Name ). DSN -
, ,
HTML-. -
DSN.
. , DSN ,
,
.

IDC

HTML: ;D:\TE5\PROB.

: ,DSN_BD_2004

: :NVP
:

. 12.10. HTX/IDC-

6. Web-

:
Access (MDB-),

.
Admin .
Web- ,
;
Microsoft SQL Server,
, -
Microsoft SQL Server Web-
. SA
. Web-
, -
.
12. 471

, , ,
Access
,
.
7.
IDC .
HTX/IDC
Web-, . -
Access hl.x
idc. Web- HTML- -
. - (. 12.11)
HTML-. IDC- (. 12.12, 12.13) -
SQL, -
HTML- .

!_*] \ , _ %^ ^

V: '.-> ) D:\TEST\TGBAP.hb: v: ;


||'|)| ]

. 12.11. -,

. 12.12, 12.13 , IDC- DSN, -


htx, SQL, ,
472 II.

SQL, , Web-
.

. -

Datasource:DSN_BD_2QQ4
Tempi at:.htx w
SQLStatement:SELECT FROM []
Password:urwrapQ4
username:WVP

. 12.12. IDC-,

. IDC -

Datasource:DSN_BD_2004
Tempi ate:.htx
SQLStatement:SELECT ._, ._,
._ , _._
4-FROM INNER JOIN ( INNER JOIN ( INNER 3OIN _ ON
. _=_.) ON . _=. _)
. _=_. _
+WHERE (((._)=%[ ]3));
password:unwrapQ4
usernamerNVP

. 12.13. IDC-,

, IDC/HTX
idc htx Web-,
. . -
, HTML- .

Web- ASP
ASP asp. -
, , US- HTML-
, .
ASP- , VBScript Jscript,
. HTML-,
ASP,
.
12. 473

Web- ASP, -
.
1. , ,
, | (File|Export).
2.
Microsoft Active Server Pages (*.asp).
3. ,
. -
, .
4. . ASP -
(Save Formatted) (Autostart) .
5. ASP (. 12.14)
HTML HTML
ODBC, >-

HTML-. IDC/HTX, -
DNS .

ASP

HTML: D: \TEST\PROBA . .

.
! ____..._
: DSM_SD_2004
~
: JNVP

; unwapCK

ASP

(LJRL) ; http;\\myserv

(): ;5

. 12.14. ASP- ,
Web-

6. (URL) (Server URL) http://<u.wi cepeepa>.


Web-, ASP-
.
474 II.

7. (): (Session timeout)


.
8. -
Web-
.
9. ASP
, Web-.

Web-

Web- ,
HTML, IDC/HTX
ASP Web-, Microsoft IIS. Web-
Web-
-, Web-
URL-.
HTML, IDC/HTX
ASP Web-.

Windows ME/2000/XP Web-
Microsoft Windows 98/NT 4.0 -
Web-.
, Web-
Web-: http://<iuur >/[< >]/<
>.
Web- , .
Web-
.
, Access Windows ME/2000/XP,
.
1. .
2.
.
3. -
.
4. URL- Web- ://< /[
/>.
5. Web- .
12. 475

Access Windows 98/NT 4.0, -


.
1. Web-.
2. Web-.
3. Web-
.
4. URL- Web-.
5. Web- .
,
.

!v j
Web-, , -
Web Folders WebDAV, IIS,
WEC (Web Extender Client) FrontPage.
Web- .
, Web-
.

, -
Web-
Access [ .


Web- Web- Access -
, , ,
, , .

Web- , -
Web- \Webshare\Wwwroot
Personal Web Server \Inetpub\Wwwroot Internet Information Server. To
Web- URL-
, -
. URL- Wwwroot.
Web-
Web-.
Web- -
Windows.
Web- , -
, : , , ,
, , Web-.
476 II.

Web- , -
Web-.
ASP IDC/HTX Access
Microsoft SQL Server.
ASP IDC/HTX Web- -
.
Web- :
, Web-, -
;
Web- Internet Information Server -
\Inetpub\Wwwroot
ASP /;
ASP IDC/HTX
;
, ASP IDC/HTX, -
,
Internet Information Server Web-
;
Access Microsoft SQL Server
DSN -
(. -
10). ,

ASP ( IDC/HTX). , -
ODBC;
ODBC,
-
. -
,
ASP ( HTX/IDC),
ASP IDC/HTX.


(Data Access Page)
Web-, -
OLE DB Access Microsoft SQL Server.
Internet Explorer
.
, , -
, .
12. 477

Access
htm .
(Pages) Access ,
HTML.
Access -
, Access
.
-
.

Microsoft Internet Explorer, Access,
. ,
.
-
Web-
, -
.
,
Access,
Microsoft Internet Explorer 5.01 SP2.
HTML, DHTML, CSS, XML, ActiveX, DirectX,
World Wide Web Consortium (W3C), -
Microsoft. -
Internet Explorer -
. , Internet Explorer 5.5
, -
.
-
,
, -
, Web- Microsoft Office (Office Web
Components). Web- Microsoft Office
ActiveX, Microsoft Office XP.



-
, ( , -
), Access
4 78 .

. , , -
Access
.



(. 6)
. | . -
(. 12.15) .

',.,' : OK

. 12.15.

, .
Web-, Web-
. ,
, , 12.16. ,
OLE-, .
- .
.
,
. : -
, -
, .
,
, , , , -
. -
, .



.
12. 479

- Microsoft Internet Explorer



K
I ] .2" V. ' " ^jf
1
, #]0:\51\ .htrn V

jKopn/C MiniTower

roBsps

f~ pl6,DOp.

(''

20,00%

TOBAP40F12 > .14


. 12.16. ,



,
(. 8), [
.
. . 12.17
. , ,
, -
, .
-
, , -
. ,
480 II.

, ,
.
. -
.
.

3 _ - Microsoft Internet Explorer


^ ^ ^

5
' ,*.! =- S' * *** ' tjf

N2 111

1.!> , 34 3123452345
778957651111

76358509732537

.
HIKI.WMI (1,1(11

17LG ; ' ' 100 6 537,00. 5,00%


FDD 3,5 1,00 ' , 6,00%
17LG 2,00 5 .! 587,00. 5,00%
1TLG 3,00 5 : 6 587,00 5,00%
FDD 15 3.00 5 363,00. 6,00%
CVHHA:

222 29.12

. 34 8123452345

. 12.17. ,

, ,
, .
12. 481



,
7. . -
, Web-
Microsoft Office (. 12.18). -
.

, #WI
5 * - Microsoft Internet Explorer [-
f
1 ;
"'' ' '- *3 3 *1 '*'>: J" -..'' *5* ^ (. '1~ ,"& \J$ ' ,..; .

; j^Sj D:\Testl . . Mfc

.1 -
| 2004
- _"
. i
|111 ;
222


.> - ..." ."..' - . '*.-. '.'.'.' .'.""'
.. " " " " " ";
'CD-ROM Panasonic IDE ! 24 16 40
DIMM64MPC10Q ! 5 5 1 1 6
:
FDD 3^5 ! 15 15 15
HDD Maxtor 20GB "It 8 8 3 3 1 1
". Genius Liv 10 10 3 3 13
17LG ! 12 7 19 4 4 23
1 10 1 : 19
; ' ?"
; 17LG
j
_____._ __.^,.^_^_, : -
: = 2004

. 12.18. ,


, ,
Web- Microsoft Office.


-
, -
.

, . -
.
482 II.

.
.



, ,
, -
.
.
,
, .
, , -
,


Access
Access, Microsoft SQL Server, -
.
, .
(Connection String)
, .

, Access , -
. -
, -
, ,
(Connection String),
( UNC) .
(Connection String) -
. -
, , -
, ,
-
. , ,
,
( ode Office Database Connection).
, , -
.
, . -

(Data Access Page).
^2. 483

(. 12.19). ,
| (File|New).


Wgl
: X ..> ^Jj *

SQL-, ode
^+ ,ode
?] , ode

__$ : ! .
, ""
: bee (*.ode; *, [

. 12.19.

-
ode .
,
, -
.

.
-
; ,
.
-
. -
(. 12.20) -
OLE DB. -
Microsoft SQL Server .
OLE DB
. ,
484 II.

Access, Micro-
soft SQL Server.

, ,

>

. 12.20.

-
(Data Link Properties) (. 12.21).
OLE DB, , -
( (Provider)), -

(Connection). SQL-
IP- .
Access UNC-.
(Test Connection).
10 //.
, , -
.
, . 12.22, -
, . -
,
, -
.
12. 485

j |

. Access:
1. :
( ToeapoB.mdb

2. :
: (Admin

I51

. 12.21.

, , -

.
(Field List),
, (. 12-23).

(Connection File).

Access ,
(. 12.24). -
. -
,

, .
, -
.
486 II.



,
'" .

;
juments and SettJngs\WVP\MoH \ \,^

"
:
( ,
)

. 12.22.


L^JJ '^ ^
^ 0;\ TOBapoB.mdb
;-! ipj
||
+ []
+ [
: ^ []
+ Q
+ fJ3
+, []
+! _

+: [3
. 1+1- ^3
+ J

. 12.23.
12. 487

!
[ ]

0_ :

: :whitesmoke . ,,,!

; BACKGROUND-COLOR; steelblue; COLOR: white; FONT-WEIGHT: bold


: BORDER-TOP; steelblue Ipx solid; FONT-WEIGHT; bold


'V
;
D:\Test ,.,
V
:
5 \NVP\Mon \ \.^ ,,,

II I ]

. 12.24.

, .

,
. Access
, ,
(. 12.25).

Microsoft Office Access


.
.
, (
UNC).
" | -- !

'

. 12.25.

,
. -
488 II.

( . -
(Connection String)
.
(Field List)
. -
.
, -
.
-
, , ,
(Field List)
.
(Connection).
(Data Link Properties)
.




. , -
.


Access ,
, .
-
. , -
, .
1. " ".
2. (Pages)
(New).
3. (New Data Access
Page) : (AutoPage: Columnar).
4. , -
, .
, . 12.26.
,
( , ).
12. 489


.
, , -
.


17LG


1 10 > VJK.

. 12.26.

.
, . 12.27, ,
, . -
: , .
-
. -
, -
. ,
. .
: .
,
/;** \. -
-
(\*?,. -
,
. , ,
, -
, .

490 II.




6587,DOD,
(
: f?
%^
1 10

. 12.27.

. -
(. . 12.24),
Access ,
. HTML-, -
htm. Access
. ,
-
.
Access. Internet Explorer,
, Windows.
, -
, , , -
.
Microsoft Access
| (File|Open). Access
, , -
, .



.
1. ,
,
(Filter By Selection) (L^J) -
. .
,
.
12. 491

2.
,
(Filter By Selection).
, .

3. (LLJ), .
.
4.
.
.
5. . -
,
.
^]
(Sort Ascending) (LEil).
(Sort
[zTI
Descending) (1411).


,
, , _ . -
.
1. -
(Create data access page
by using wizard) (Pages).
2. , , _
.


OLE . -

.

3. -
, _.

, , ,

.


,
.
492 //.

4. , -
, ? (Do
you want apply a theme to your page?). (Finish).

. , -
.
,
. 12.28.

: -_

_;
_;
HAMMJlOKi"'"
J1OK:
_:
.

_:

:

:
!

: flOFOBOPWiz

} 4 AQfOBOPWiz |0 |2

: 8 - _

; < -_||2 V

. 12.28. ,

5.
(View). , -
.
12. 493

Access
SQL, .
.
, , -
.
.
.
.
,
,

. ,
, .
6. .
. 12.29.

: -_ '



if
', " : " ~" " '"

: -_

-_ JO |2

. 12.29.

494 II.

7. : -
_. -
-
. , . 12.29.

( i
, -
.

8. Src
/ (Black Plus/Minus)
(. . 12.28) , , (Folder) ( I).
9. ( )
, -
. (. . 12.28)
: \\.
<Delete>.
10. -
: \1
(Caption).
(Record Navigation), -
(Footer) .
11. (View). -
,
. 12.30.


~ " 02200*

[ [, 34

I763585Q97632W5 ;. { t

L3
* -JJOM Hi 3 J- *"* ^ _? *":

. 12.30.
12. 495

12. ,
.
.
13.
(. 12.31).

if:

. | 111
11.02.2004

(
fnooT ^^^^""

[~ 1 IOS 830.000


C
f"a

1 [ 17LG

1 [FDD ,5
2 ]17LG

3 I FDD 3,5 I 363, DOp 3630,00.

- 4 -_ 1

. 12.31. ,

, ,
: -.
,
.
,
. -
, mdb . 12.32. , .-
, .
,
, .
496 .


,
- !
| * ) ^
, - 0:\ , mdb


-^
'01
, !*>
- _
? _
^

[] _
Jfj _>
j
-|
$

V
>: ]
+, _

Si
rii
^J

. 12.32. ,

, -
Access, ,
, ,
, . -
,
(Data Outline)
, (. 12.33).
, .
Access , -
( .
,
.
-
. .

, .
12. 497

, ,
, .


^

! -
5F _-
; i^f __
[?f __
:
[?f __
L? _
. ^ __
L [?

- L I -

. ]
.
; -
: - _
.
: _
. ^
-..] _
_

_
^

. 12.33.



1. , -
.

_,
. .
2.
(Great
data access page in Design view).
3. .mdb,
(. 12.32).
498 II.

, . .
.
4. _
,
(Drag
fieldsfrom the Field List and drop them on the page).
(Layout Wizard) (Columnar). -
, ,
. Access -
, -
, .
5. _, -
_. _ -
(_._ -
._ ._ ._) -
.
.

j
, -
,
_ , .

6. __ .
7. ,
(Data Outline) .
, , .
, -
(Relationships)
(. 12.34). Access -
,
(Data Outline).
8. -
, _
, _
_ .
. _
, .
, -
, . -
,
, .
12. 499



- D _
- _
ff^ _
- i=$ _
"f? CPOKJ1OCT
_
! _
-

ff _ ,
ft; _

...
! _ i
-
*? _1

?1? !
KO_TOB_LitRo^vsoutce
"-'. dP KOfl_TOB_ListRowsource
_
ft; HAMMJOB

. 12.34.


, -
.

9.
. ,
.
.
10. , . 12.35.
i 1. , ,
. , -
17 . 835
500 II.

Controisource :
= *.

: _ ^


-

:
. ?"

! '

; _

_ |0 |2 V

. 12.35.

12. : "!
".
13. ,
(. 12.36). -
_ .
14.
. -
, , .
-
. -
. ( ...#) -
. :
, , , -
, -
.
12, 501

. ) ,
.

'3 - Microsoft Internet Explorer L,



:
:' '>' >"

'>V ^& (''i - ;

^ \&\ D:\Tesl:\BBOA .htm . i jjrj

\ 11.02.2004


| , 34
(76358939763264

.
;

17LG "537,00. | 656 700,00.

1 19

. 12.36. ,


, , -
.
. -
. ,

. DataEntry
. ,
.
502 II.


-
, .
, , -
,
, , ,
.

,
.
-
, , -
, -
.
-
, -
.
, .
1. -
(Creat
data access page in Design view).
2. ,
.
3.
_ _. -
_ _.
. ^,
__, _, _, __.
. , -

. , -
. -
.
4. ,
. -
(Group by Table) (1 I)
-
, .
12. 503

5. _
(Group by Table). -
_
(Group by Table).
, -
(Demote) ( ) . (-
mote) ) .

[ '
: *

|
:

' N 4 |0-|1|2 J # V 0?1


:

14 |0-[1 |2

< |0-|1 |2

|0-|1|2 X Z|

. 12.37.
504 II.

6. .
.
, -
, .
7.
. 12.37.
8. (. 12.38). -
-
, -
.

I 12.12.2002


002

IHQQ3 ]

1-2 2

I 1-2 3

f^iis
4 1-2 4

-26 > I

. 12.38. ,

12. 505

9- , , ,
, .
,
.
10. .
-
.
11. -
Title (More).
, , , -

.
, -
, , , -
. , -
, "." files.

,

, ,
. (AllowAdditions),
(AllowDeletions) (AllowEdits)
,
(GroupLevel) .
-
.
DataPageSize.
. -
.


Access -
.
. Microsoft Access -
.
Word, Microsoft Excel -
HTML. -
. , ,
,
.
URL- UNC-.
, .
506 II.

-
(Hyperlink).



1. , -
, , .
2. (Hyperlink)
.
3. (Insert Hyperlink)
(Link to) .
4. (Text) ,
. , Access
, -
.
.
5. (Screen to) ,
.
, Access
.
6. ,
, , .
(Hyperlink).
7. , -
, -
. Access Web-.
8.
.
9. Access. Internet Explorer -
. , -
.
.

(Back) (Forward).
10.
(Link to) , - (Existing File or Web
page). (Web-page), -
. Internet
Explorer Access. URL- Web-
(Text) (Address). -
12. 507

, -
,
{Browsed Pages).


-
.
1. .
2. | (Insert|Hyperlink). -
(Insert Hyperlink) pas-
(Link to) , -
(Existing File or Web page).
3. (Text) ,
. , .
.
4. . ,
.
(Recent Files)
. -
.
5.
(Bookmark) .
.
6. . Access
Web-.



1. -
(Hyperlink) -
.
2. (Insert Hyperlink)
(Link to) (E-Mail).
3. (Text) : "
". , Access
. , -
.
4. . (E-Mail) -
, : pushkina@finec.ru. -
.
508 II.

5. , -
.
6. . Access -
, , Outlook Express,
.
.

Web-

-
. -
-
, .
,
! .
Web-
Microsoft Word, Web-.
1. Microsoft Word
.
2. Web- (Web-Page) -
Web- (Web-Page Wizard).
3. :
Web-;
;
, -
Web-;
, -
, ;
, ,
Web-, , ,
, ;
,
Web-;
(, , ).
4. Web-:
;
;
12. 509

, -
, ;
,
: , .
Word
.
HTML-
Web- , -
Web- -
.


1. ?
2. Web-
?
3. Microsoft Internet Explorer -
?
4. , , Access
?
5. , -
Access?
6. ,
?
7. , ?
8.
, ?
9. , -
, ?
10. ,
?
1 1 . , -
?
12. , -
, ?
13. ,
, ?
14. , -
, ?
510 II.

15.
, ?
16. Word Excel?
17.
, Access?
18. ,
?
19. URL- Web- mysei-ver.finec.ni?

1. Access Microsoft SQL Server.


2. OLE DB.
3. Microsoft Internet Explorer 5.0 .
4. .
5. .
6. (Field List).
7. | .
8. .
9. .
. .
. .
12 .
13. .
14. .
15. , .
16. .
17. Microsoft Internet Explorer.
18. .
19. http://myserver.finec.ru.



13


, , -
.

. -
, , , ,
-
.
, , -
.
Access: , -
, , Web-, , -
, .
Access .
-
, , , -
,
,
.
-
.
, -
. , ,
, , ,
.

, *
, . . -
. -
;
514 ///.

; , , -
; ; ,
.
, . .
-
.
-
, -
, -
. :
D -
, - -
;
- ,
;
, -
, .

.

: -
; - -
- - .
.
. -

. -
-
. -
. . -
, -
.
, -
, Web-
, , , -
. , ,
-
. -
, -
.
13. 515

Access -
,
, , , . . 13.1
.

-
-



..
. 13.1.

- ()
, ,

( , , ). -
-
, . 13.2.
, , , Web-,

Visual Basic for Appli-
cation VBA. VBA
.
-
, -
, ,
.
, -
Web-, -
516 III.

- . . 13.3
-
Access -
.

fi&\

L r
, -r-^ __
"^ .V'

171
;| I.UUJ |

^
^ "
1 _J
.. -t-.
Hifj^kjlr

. 13.2. -

--
Access
*v->
,
[ ()]
-^

f~g gn
1 Q

-
"?-


\ -


Visual Basic



I

, ,

Access

. 13.3. Access, ,

13. 517

-
, -
. -
.
14 , -
, -
, .
-
VBA,
,
- .
14


, Access
, ,
, , , ,
. Access
-
. , -
, , .
, -

.
, .

. , -
,
, . -

.
Access -
. Access 2000,
Visual Basic for Applications (VBA). , -
, -
VBA. ,
VBA.
,
( ""). , -
Access
. \
, , , ,
, , ,
.
(RunCommand) Access, -
14. 519

, .
Access ( 50)
, .

Visual Basic for Applications, ,
VBA, -
, .
, VBA.
Access,
.
.
, -
.
, -
.
, ,
, , .
-
.
.
Access
, .
Access. -
, ,
, .
, ,
. -
, -
, ,
, ,
, -

.

.
-
, . , -
, , -
.
520 III.


-
,
. .
.
, -
. -
, .

, . -
, Access
. -

. , -
,
.
,
(Macros) (New).
.


, ,
(Action) (. 14.1).
.
.
(Action Arguments).
,
.
.
(Comment) -
, .

. -
.
, -
| (FilejSave) -
.
-
(Run). , -
14. 521

(Run) -
, -
.

(Design).

! :

. 14.1.



-
.



.
, -
. , -
(),
(Edit) (Data
Mode).
522 III.

, -
. -
(), (OpenForm),
(OpenQuery), (OpenReport),
(OpenPage), (OpenModule)
(RunMacro).
, ,
, -
, .


-
,
.

, -
, -

.
, (Object
) (close)
(Datasheet). (Object Name) -
.
(Object Type)
(rename)
(Object Type) (Old Name).


, -
, ,
.
, .
(Macro
Name). , (Macro Names)

(View). (Macro Name) -
, , -
, .
. , -
, .
14. 523

, ,
.
. , -
, :
.



, , ,
, -
, .
(RunMacro).
, -
.
(RunMacro):
D (Macro Name).
, :
.

{Repeat Count) . -
(Repeat Expression) ,
;
(Repeat Expression) . -
(False) -
.
: (Repeat Count)
(Repeat Expression), -
, , -
(Repeat Expression), (False),
.
(RunMacro) -
(Repeat Count) (Repeat Expression) -
.
-
,
(RunMacro). . -
-
.
(RunMacro) -
. , , -
524 III.

, . . -
-
.


, -
-
.
.
-
.
, -
, -
, .



(Condition).

. .
,
, (...)- -
, , -
, -
. , ,
, ,
, .
(. -
. 14.2). False () -
. -
.
,

. -

(stopMacro). (RunMacro)
.
. 14.3.
14. 525

. 14.2. -

9 2 :

[_] Is Null f


,

[_]=''




.




(Dopna

[_]=[]![1

,

. 14,3.
526 III.

. 14.3
.

: ,
.
, _
. , . . -
, , -

.
. ,
. . ,
, ,

.
,
. -
.



-
.
, :
:
>=2000;

( )
2 95 . 2 1995 .:
[_] Between #2--5# And #2--95#

() :
Is Null([]) [] Is Null

-
_ _ :
[]="" And [_]>15

, , Dcount, Dmax, MsgBox:

:
DCount(![]! [_]; '')>50
DCount ( ' * ' ; '')>50
14. 527

;
DMax{![]![];'')>500

MsgBox
, ,
(Cancel), -
. , MsgBox, -
:
MsgBox(" ?";1}=1

, -

(Cancel). ,
1. (Cancel),
2.
-
, :
_

:
Forms![]![_]=[_]



, VBA, -
. Access
, -
. , ,
. , , -
.
-
, . , , -
, -
.

.


, , Access -
.
528 III.

(Forms), (Reports).
, , .
,
. , :
Forms![ ;.


-
. ,
.
.
,
. , (Record Selectors)
(RecordSelectors), -
(Scroll Bars) (ScrollBars).
:
Forms![ ].ScrollBars

Access
.
.


-
, -
.

.
.
-
: ";" , -
, . , " i " -
,
. "." ,
Access. , "."
, .

(Caption) _
:
Forms![ ]![ ]
14. 529

, ,
.
(Other) (Name) (. 14.4).
(Caption)
_ .
(Format) .

|| : [_
[^

] |
_




DetachedLabel

. 14.4. (Caption)

,
(Visible) (Format) (. 14.5), -
: visible:
Forms![ ]![ ].Visible

': _

| ]
.,




5,64

. 14.5. (Visibl<


( ) Access
().
(Subform),
530 III.

(Subrepoit).
( )
().
/ (Subform/Subreport) -
(Form) (Report).

. , -
, , :
Forms![ ]![ ].Form![
].

,
Form Report.
,
- _
, :
Forms![ ]![ ]![_]


_
: (Item)
[CYMMAJTOCT], (Expression) - [_]*[;
(. 14.6).

[ JTOCT]

[_]*[] ,

. 14.6.

, -
, _
,
. -
.
, _,
_
14. 531

(Event) (After
Update) : (. 14.7).

:

) .


. . . .

. 14.7.


_ CVMMAJIOCT.


,
.
,
, ,
LiJ.
(Expression Builder) -
.

, . -
. -
, (Value),
, .
(Paste).
, .
Access ,
. ,
.
, ,
, ,
.
,
, , -
, .
I S
532 ///.



, . -
,
, .
.
. -
.
, , -
. ,
.
, -
. Access
, ,
. , , , -

, . -
, , .

,
. -
, -
, , .


(Run) -
.

(Macros)
(Run).
Access
|| (Tools| Macro] Run)
(Run Macro) (Macro
Name) (. 14.8).
14. 533

. 14.8.

(Macro Name) ,
, ..
(Run Macro) (Macro
Name) , -
, , .
, -
.
. Access
, , -
.
AutoExec , -
, , -
, ,
.

AutoExec. Access -
.
,
Au-, <Shift>. -
<Shift> AutoExec, -
(Startup), ]
(TooIs(Startup),
Access {Use Access Special Keys).


Access -
-
, . -
.

. , -
534 ///.

, -
.
,
. , -

(Before Insert) (After Insert),
.
(Before Insert) -
,
. (After Insert)
.
(. 14.9).

1 ]

!.Ml

. 14.9.

-
. ,
, (Before
Update) (After Update),
, .
(Before Update) , -
.
(After Update) -
. -
, . . ,
. -
-
| (Records|Save Record).
.

(. 14.10).
14. 535

* :
_

{
. . ,
.

. 14.10.

,

, -
, ,
. ,
, ,
, .
, -
, , ,
, .

.
,
(Exit) (Lost Focus), -
, (Unload), (Deactivate)
(Close). :
= =* => =>
() -
, , , -
(Exit), (Lost Focus); ,
, (Enter), -
(Got Focus).



-
.
(Event) (On Click) .
536 III.




(Macros) ,
, ,
. , -
. ,
.
, -

, .
, -
, , , -
.
(Event) (On Click)
(. 14.11).

:
V

| | \




!.2

. 14.11. ,


-
. (Control
Wizards) (Command Button).
(Command Button
Wizard), (Miscellaneous)
(Run Macro). , -
. -
, .
,
, Access -
.
14. ^ 537


,

, ,
, _ .

(. 4):
1. , -
,
.

2. ,
, .
3. ,
, , _
.
, .
, * -
.
1. ,
(Macros) (New).
(. . 14.1).
2. , ,
(Action).
(openQuery), -
.
3. -
(Action Arguments)
(. 14.12).
4. (Comment) ,
, : "
, ".
5.

(openQuery). -
.
53S HI.

6. -
. ,
, , -
. (OpenQuery),
-
, (.
. 14.12).

? :
__| I
^ *.] ,





,
, .
F1.

. 14.12.

7. , -
(Save).
8. , (Run).
9.
, .
-
(setWarnings).
(Warnings On) (No).
-
.
(Yes).
10. ,
-
. , . 14.13. -

.
.
11. , -
(Run).
14. 539

:


, _



,
,
,









i


Microsoft office Access.
F1,

. 14.13.

12. _
(. 14.14).
13. .
-
, . -
, . -
, .
, .
:
(Minimize) , -
. -

, ;
() .
-
.
540 III.

. -
;

[
09.03.2004 111
11.03.2004 111
04.02.2004 111
HQQ2 01 . ! _11.03.2004 222
; ] MjHjt] 12

31 268,00 I \
CQ2 4 612,00
. i'soo'nop
'." 2935,00

. 14.14.

(Movesize) -
.
;
() , -
;
(Restore) ,
;
(setwamings)
-
.


. ,
(Table Name)
() -
.
. -
-
, .
14. 541



,
, -
.
, -
,
.

, (. 6). -
_.
,
-
.
, Ml
2. Ml
, -
. 2 -
_,
. 2 , ,
, -
. -
, ,
.
1.
(Macros) (New).
2. ,
, -
(Macro Names).
3. Ml 2, . 14.15,
. -
.
4. Ml (On Open)
.
, (Properties),
(Eventbi) (On
Open) .Ml (. 14.16).
5. 2 _

(On Dbl Click) .2 (. 14.17).
542 III.

:
^
"



"
_jj [_]=[] [[ ]![_]


[_]![
,
WHERE (SQL)
,

,
/ ,
F1,

. 14.15. ,

j |
Del
,Ml

. . .

. 14.16.

^
[ |

. 2 -lUl v

. 14.17. _

14. 543

(On Dbl Click) -


_ ,
, -
__ .
6. ,
.
M l .
.
7.
. 2 -
. ,
[_]=![
] ! [_]
.
8. 2 , ,
, _:
2 (On
Dbl Click) _ (. . 14.17);
(Enter)
.
(Enter)
_, ,
_. ,

(Enter).
, ,
. _
,
(Enter). -
.

, -
(Tab Order)
.


-
. ,
. . .
544 III.

9. ,

. __.



-
,
.
,
-
.
-
, _ ,
_ , _ .
_+_. -
.
-
. -
, , -
.
_+_ _
( _) .
(. 6).
(. . 6.30 6)
, -
,
. ( _) -
, -
, -
.
1.
(. 14.18), :
,
;
,
;
,
-
.
14. 545

:
]


|_^ [_]=[]1 []![_] And
[]![
, .




,
[_]=[]![
WHERE (SQL) ,

,
/ .
F1.

. 14.18.


, ,
-
,

2.
(openForm) ,
.
3. , -
(OpenForm) (Minimize),
. -
, -
, ,
,
.
4. ,
, (On Open)
..
.
-
, . -
,
.

546 lit.

.
(After Insert) _, -
.
5.
, , -
(SelectObject), -
, (ApplyFilter),

[_]=[]![]!'_] And
[_]=[]![;!;_].[]![_]

6. ,
,
.
.
7. .

(setvalue), -
.
(Item) ,
. (Expression) -
, .
.
8. -
, . .
-
, (Condition), -
, -
(SetValue) (Condition)
:
[]![ ]![_] Is Null

9. , . -
(SetValue)
_ .
() , -
, :
[] ! [ ] ! [! ]

(Expression) , -
, :
[]![]![ ]
14. 547

:
[]![ ]![_]
; ]![]![ ].[Form]![ ]

i4 )
, ,
, -
.
_
_, , (Expression)
(SetValue) .

10, (SetValue)
, .
, -
.
11. (SetValue) -
. -
. :
[]![ ]![_]

(Expression):
[]![ ]![_]+[_]


.
.

12. _,
(After Insert) -
. .
13. -
. -
(On Close) ..
14. (close)
, . -

, , .
15.
(OpenReport).
. -
, -
548 III.

, .
, -
.
16. ,
, . .


,
,

. , -
.
1.
MsgBcx. (OpenReport)
., . 14.19.

:


MsgBox(" ?";68)=1

. 14.19.

2. MsgBox , , -
, , , -
, . -
, , -
, . -
, , , -
. 14.20. ,
.

. 14.20. , MsgBcx
14. 549

MsgBox 1
2 .
3. ,
.
, .

"/", -
, , ,
, .
1. -
-
. ,
, .
. 14.21 ,
.

,, ?


"" '- *--*

|[ PJ 1 ., If, --!,;

]
1
3
:

. 14.21. ,

2. , -
,
, (. 14.22),

{ |



, . . . , " ";''
1

. 14.22.
550 III.

3. ., . 14.23.

:
I [..___._ I


! []=" "
[ ]=" "
.

. 14.23.

4.
.
5. .
(openReport)
!.


, , -
.

6.
(. 14.24) (After Update) -
. 1.

:
v |

| | ] ]

. !
, ,

. 14.24.

7. , -
.
8. , .
, ! .
9. -
,
, ! .
14. 551


, -
, : " !"
1. -
" !" ,
20.


,
.
.

2. (Visible) (No).
3. . (. . 14.18) -
(setvalue), -
v i s i b l e ( ) . -

, ,
(Condition) .
4. (Item) visible
() 20: 20.Visible.

5. (Expression) -
.


20.Visible
, .

6.
,
(secvaiue).
, (Expression) -
visible (No) (. 14.25).

;
, ;,, j.i- _



[]![
BnepBbiej

, 14.25. ,
552 III.

8. . ,
, , ,
, " -
!" , .


1. Access?
2. ?
3. ^ ! !
(. . 14.2) False ()?
4. ?
5. , , ?
6. , -
?
7. ?
8. , ?
9. ?
10. ?
11.
1?
12.
?
13. ?
14. ,
?
15. ?
16. ,
?
17. ?
18. ?
19. ,
, ?
20. , ?
21. ?
22. ?
23. ?
14. 553

24.
[]![ ]![_]+[_]
_ ,
_ _ ?
25. -
?
26. -
.! ?

1. (RunCommand).
2. .
3. .
4. (GoToRecord).
5. .
6. .
7. (SetValue).
8. , .
9. .
10. Forms![ ]![ '
. .
12.
13. , .
14. .
15. ().
16. (SetWarnings).
17. (Run).
18. "" .
19. | (View|Macro Names).
20. ..
21. .
22. .
23. .
24. _ .
25. .
26. .
15

Visual Basic

Access -
-
. -
,
, , -
, ,
-
, Access --
Visual Basic for Applications - VBA (Visual
Basic ). -
,
. VBA Access -

, ,
,
.
VBA Microsoft
Office, Access, Word, Excel, Outlook PowerPoint. , -
, , VBA -
Office, . VBA
Visual Basic.
, VBA, -
, VBA, Visual Basic
.
VBA Visual Basic. -
. Visual
Basic, VBA .
15. Visual Basic 555

VBA, , -
Access, , -
, .
VBA ,
Access,
, , .
Visual Basic
-, -
.


Access
VBA. , -
. , -
, || (Tools)
Macros 1C on vert Form's Macros to Visual Basic),
. , -
, , ]
(File|Save As).

VBA
:
;
, , -
;
-
;
;

(,
W H I L E . . .WEND);
G , ,
;
;
;
Office;
;
, , -
.
556 III.

VBA
- ,
. -
Access , , , , -
, .
. -
. -
, , . -
VBA .
,
. -
.
, -
,
.
Access ,
Access. -
Access VBA,
.
Access VBA,
, .
, .
, ,
VBA Access,
, .
, -
: , , , Access
.
DAO (Data Access Object )
ADO (ActiveX Data Object ActiveX).
DAO , -
Microsoft Jet ODBC- -
, , .
, Jet Access, -

. Jet ,
, Microsoft Access.
DAO (workspaces):
Microsoft Jet workspaces Jet,
ODBC, Jet,
15. Visual Basic 557

- ISAM, Paradox.
FoxPro, dBase;
ODBCDirect workspaces
, Microsoft SQL Server, ODBC, -
Jet.
ADO , -
, OLE DB, ,
, .
ADO , , MSDE, SQL
Server. , Access 2000,
2002 2003, ADO. , -
Jet, QLE DB, -
, ADO
.
ADO, 1999 , -
DAO, . -
Web-
ADO . DAO HTML-
, VBScript JavaScript.
DAO Web-, Visual
Basic 6.0, Web.
- -
,
, .
.
VBA . VBA -
-
, . -


- ,
, , -
.
, Access VBA, -
, . -

VBA.
.
558 III.


-
, , -
. , -
, ,
. , VBA,
( ).
, , ,
, .
.
.
VBA Access
Access DAO ADO.

Access
Access , -
Access ,
, , , ,
, .
Application,
. Application
Forms (), Reports (), Modules (), References
(), screen (), DoCmd () . -
Forms Reports .
Controls Properties.

.
Screen ()
( ) : , .
DoCmd ,
VBA Access.
Access -
. References
Reference, -
.
, -
Tools|References VBA.
. 15.1 References
Access 2003.
15. Visual Basic 559

References -

Available References; OK

Visual Basic For Applications Cancel


V Microsoft Access 11.0 Object Library
OLE Automation
Microsoft 3.6 Object Library Browse..
V. Microsoft ActiveX Data Objects 2.5 Library
at ActiveX Control module
IAS Helper COM Component 1,0 Type Library
IA5 RADIUS Protocol 1.0 Type Library Priority
1
Acrobat
Acrobat Access 2.0 Type Library
. Acrobat Distiller
Acrobat WebCapture 1.0 Type Library
1
Acrobat WebCapture IE Toolbar/Favorites 1.0 Type I
ArrnTFHfilnftr 1 . Tvn I \hrArv

HMEdit ActiveX Control module

Location: E:\Prograrn Files\Common Files\HyperMethod\nmedit,ocx


Language: Standard

. 15.1.
Access 2003

, Access 2000,
2002 2003, Microsoft
ActiveX Data Objects 2.5 Library (ADO 2.5). , -
, -
Microsoft DAO 3.6 Object Library (DAO 3.6).
Access Microsoft Access
11.0 Object Library.
-
VBA . ,
Access Microsoft Excel -
Microsoft Excel. VBA,
Access, -
.
Application
, , Microsoft Excel.
. -
appAccess.DoCmd.OpenForm ""
appAccess
OpenForm DoCmd.
560 III.

Forms!frmFaktura.RecordSource^strSource -
RecordSource f r m F a k t u r a
Forms ,
strSource. , , -
, -
Me ( ""): Me.RecordSource=strSource.
currentProject -
,
Access (mdb) Access (adp).
, .
currentoata ,
(Jet SQL).


, VBA, -
.
VBA Jet.
, , ,
. -
, ,
, -
, .
DBEngine. ,
workspace.
workspace, ,
Database. Database -
- TabieDef, -
QueryDef, Recordset . . , -
.
Database
. , OpenRecordset,
Recordset, -
CreateTableDef CreateRelation .
Recordsets Recordset.
Recordset Fields. Recordset
.

Recordset, , .
Access.
15. Visual Basic 561

Recordset :
D Recordset -
, , -
;
Recordset -
, .
Recordset -
. ,
.
Recordset
Recordsets
. Recordset ,
. -
MoveNext, MovePrevious, MoveFirst
MoveLast.
Move EOF
Recordset.
TableDefs TableDef -
. TableDef :
Fields Indexes.

, TableDef,
;
Recordset.

Fields Field
T a b l e D e f , Index, Q u e r y D e f , Recordset, Relation.

Fields T a b i e D e f , I n d e x , QueryDef R e l a t i o n
, . Fields
Recordset Field, .
Field, Recordset,
Recordset. index
, -
.

, MDB, ,
FoxPro, dBase, Paradox Excel -
. ,
Microsoft SQL Server , -
ODBC.
V8A,
.
562 III.

VBA, ToolsjReferences (| I -
-
Microsoft DAO 3.6 Object Library

ADO
ADO (ActiveX Data Objects)
, ,
OLE DB-.
, ,
, -
. . ADO
- Web-.
VBA ADO
OLE DB. , OLE DB, -
ADO: connection,
Command, Recordset (. 15.2).

Record" Stream
Errors

[
Fields
Error Field
-| Properties

Property
]

. 15.2. ADO

D connection. OLE DB,


-
. Execute
Recordset .
Command. SQL,
.
SQL, , UPDATE, INSERT,
DELETE, .
Recordset.
Recordset. ,
, .
Command Recordset
Connection.
15. Visual Basic 563

VBA -
ADO, ActiveX Data Objects.
-
, , Recordset ADO . ADODB, -
ADO,
ADO, : ADODE.Recordset.
ADO . ,

:
Dim wrksName As DAO.Workspace
Dim dbName As DAO.Database
Dim rstName As DAO.Recordset
Set wrksName=DBEngine.Workspaces(0)
Set dbName=wrksName.OpenDatabase (".1")
Set rstName=dbName.OpenRecordset(" SQL")

.
ADO , -
, :
Private cnnName As New ADODB.Connection
Private cmmName As New ADODB.Command
Private rstName As New ADODB,Recordset
.
,
open
Connection Execute Command. Open
ADODB.Recordset, 3 OpenRecordset, DAO
DAO. Database, .

, , ADODB.Recordset -
ADODB. Connection. Recordset .
connection
. Recordset, -
, .
:
connection Errors Properties.
Errors : Count , -
connection,
Command Recordset;
19 835
564 III.

Command Parameters,
.
Parameter -
;
Recordset
. Recordset , -

. Fields -
( ). Field,
value, " ". value -
" " Recordset -
Recordset, "
".

VB
VBA , -
, .
, . -
VBA, , .
,
. ,
, -
. -
. -

, , -
.


-
(Modules).
- -
. -
. -
. -

, , .

:
-
. -
15. Visual Basic 565

, . -
, , VIM
.
.

-
. ,
() . -
, .
, -
.
, , , ,
. .
-
, -
[ ] [Event
Procedure]. .
-
. (Build) -
VBA -
.
()
, . -

[ ]
[Event Procedure].

()
| (View Code) . -
, , -
. , ,
, ,
.
. 15.3
, Click
( ) (Command Button).
.
: -
.
566 .

Si - _ (Code) SBB

14

Private Sub C l i c k ()
TJ Click

DblClick
TJ

On Error GoTo Err Erdet


Exit
GolFocus
DoCrod. Close KeyDown
Key Press
E x i t C l i c k : KeyUp
LoslFocus
E x i t Sub
Mouse Down
Wo use Move
Err KEtonKa_Click: Mouseup
HagBox Err . D e s c r i p t i o n
Resume Exit C l i :k

.iILJ
End Sub

. 15.3.


,
VBA (. 15.4).

. 15.4. VBA

,
, . -
-
. ,
, -
.
15. Visual Basic 567

. . -
, , ,
. ,
, .
sub Function.
sub -, -
. F u n c t i o n -, -
.
. (Public) -
(Private).
. -
, .

(Public) , -
.
, , -
,
(. 15.5).

1
1

NJ

N |

. 15.5.

, ,
. -
sub Function .
568 III.

Sub -
-
.
,
.

J
,
,
(General) . , , -
-
. , -
.


( ) -
, .

(General), -
.

VBA -
VBA.
,
.
, ,
, . , -
, .
VBA : - -
sub - Function.
, ,

-
-, Sub-,
. , -
, , , .
Sub .
,
, . -
.
15. Visual Basic 569

sub ,
. Sub
. sub .
- sub:
;Private I Public] [Static] Sub [( )]
[]
[Exit ]
[]
End Sub

:
sub snd Sub ;
public -- , sub , . .
;
private , sub
, ;
static , sub -
;
Exit Sub - - sub.
sub Exit si:b.
.
Sub
.
,
sub . -
. , , -
.

. sub
Sub Function, . . .
Sub, Public
Private, .
static, -
.
, sub, -
: . ,
, , Dim,
. , ,
570 III.

, ,
.
-
sub, -
.
. -
(, ), .

-
- Function, -, -
, ,
. --
- ,
. - -
, Access.
Function ,
. , , s u m ! ) ,
H O W ; ) . ., .
- .
-:
[Public I Private] [Static] Function ([
]) [As ]
[]
[ ="
[Exit Function]
[]
[ =]
End Function

- -
, -
.
- .
.
, -
: -
, (""),
variant Empty.
Exit Function -
, Exit sub sub.
15. Visual Basic 571^

-
:
Function Calc (FieldN As Integer) As Double
1=< , >
End Function

Calc -, F i e i J N
. -
Calc. :_
FieldH ,
.
Function .
,
:
Function (}
=11(Year(Now),Month(Now)+],1]
End Function
, -
.
Visual Basic
DateSerial, Y e a r , Now Month.

VBA
VBA sub Function,

. , -
. , ,
.
(), -
(), -
. -
, ,
.
, VBA
:
;
D - ;
;
G (Runcode) .
572 ///.

(Rur.code), ,
VBA , -
. sub ,
Sub, (RunCocie) -
. , sub Ann ( ) ,
- Anni, A n n : ; ,
Anni.
Function Anni()
Ann ()
End Function

,
.
, , -
; . -

. , -
, , -
. -
. VBA
, .
.

.
VBA , -
. -
, -
.
, ,
, , , -
, . -
, -
, . ,
, .
:
. [[{] [) 1 ]
15. Visual Basic 573

,
.
, :
Forms! [ ]!_.SetFocus
SetFocus _
.
.
DoCmd.Close ac?orm, " "
close DoCmd, -
. acForm, "
" , .
,
.
-
:
Dim dbs As Database
Dim rst As DAO.Recordset
Set dbs=CurrentDb(;
Set rsr^dbs.OpenRecordset("", dbOpenTable, dbReadOnly)

OpenRecordset
" ", "".
C u r r e n t o b o , -
dbs. ,
. set rst -
rst.


-
, ,
, -
. -
.
, ,
, . -
, , -
, -
.
, .
574 HI ^1

-
.

, : ,
.


.
-
. -
.
variant.
. -
,
, -
. -
.
-
Dim. .
:
I Dim|Private IPablic} [ ]

X, Z, Y
Integer () String :
Dim X As Integer, Z As Integer
Dim Y As String

.

.
X Y v a r i a n t ;
Z integer:
Dim X, Y, 2 As Integer

VBA,
Option Explicit.
,
. option Explicit, VBA, -
, ,
.
Option Explicit
, Microsoft Visual Basic
15 Visual Basic 575

ToolsjOptions Editor
Code Settings
Require Variable Declarations.
.

. , -
. :
=200*0.8/7;
=" ";
Z=X/80+30;
Y=Forms ! ! _;

.
,
Dim, ,
("") .
.
,
Dim static.


Dim ,
,
. -
, ,
, .

, Public:
Public Y As String

.
,
, ,
:
Forms! . .

,
VBA , -
:
G ;
, ;
576 III.

,
;
200 ;
VBA.
,
VBA. .


, .
: Boolean, Byte, Integer, Long, Currency, Single, Double, Date,
string, V a r i a n t object. , ,
.
V a r i a n t O b j e c t .
.
, Variant.

.
VBA ,
, . . . -
.
variant
. .
, X
"2000",
+1000.
. , -
, , -
. X -
, " ".
, , -
, -
, .

. , , -
,
, . -
, .
ob:ect, -
-
, .
15. Visual Basic 577

-
, .
, Access VBA, :
Access Access 11.0: Form, Report,
Control , -
;
DAO (Data Access Object -
) DAO : Dadabase, T a b l e D e f , Index, Field,
DAO.Recordset, Q u e r y D e f , Relation. Dadabase
, Jet. QueryDef
( SQL).
TableDef : ,
. DAO.Recordset
;
ADO (ActiveX Data Objects
ActiveX) ADO: connection
Dadabase DAO, Command QueryDef DAO,
ADOD3. Recordset DAO. Recordset DAO.
:
Dim ! As Form, As Control, As Database, ! As Ta-
bleDef, ! As Field

object ! Form,
control, Database, -
! TableDef, ! Field.
Dim , ,
.


Dim , ,
.
, set
. -
, , , -
. -
, .
set:
Set =[New] { I Nothing}

.
Hew ,
.
578 III.

Nothing , -
- .
:
0 set 1=! [ ] -
! ;
Set =![ ] !_ -
_
;
!~l set Bfl=currentDB -
;
Set aal=.CreateTaeDef ("")
, CreateTableDef,
!.
CreateTableDef, -
.
Set 1=1.CreateField("", dbText) -
.

[^
.
.
-
:
1
dbs, tab!
Dim dbs As Database
Dim tabi As DAO.Recordset
' dbs
Set dbs=CurrentDb ()
' tabl
1

Set tabl=dbs.OpenRecordset("", dbOpenTable)
1
tabl
' ^_ ;
'
MsgBox " ' '" & tabl! __, vbOK
' tabl Edit
tabl.Edit
15. Visual Basic 579

' _
tabl!_=InputBox(" ")
' tabl Update
tabl.Update


.
. -
.
,'
.
-
Const.
, , -
.
, , -
. -
const Public. -
const
P r i v a t e . .
Coni
s t r i n g , :
Public Const Conl As String^''CaHKT- -
"

, -
: Boolean, Byte, Integer, Long, Currency, Single, Double,
Date, S t r i n g V a r i a n t . 6 O b j e c t .
. -
,
. 2
:
Private Const con2 As Tnteger^lCO, As Currency=200

,
const, VBA
.
, -
. , , -
.
580 III.

VBA ,
Access, VBA
ADO. .
, -
, . -
Access ;
db; ADODB
ad; VBA vb. : acForm,
acTable, acQuery, dbOpenTable, dbReadOnly, dbRecordNew, adRecOK,
adRecNew, adModeRead, adErrObjectOpen, vbOk, vbNo.

(Object Browser),
Visual Basic.
.
-
. -
.
VBA : True
(), False () Null ( ),
VBA. Yes, NO, on, O f f
, , . . -
Access.


.

, , ,
.
-
( ) ,
.

Go
GOTO -
, .
: GoTo { | }

, , , -
. _ ,
40 . -
, , -
15. Visual Basic 581

. , -
.
.
,
. -
, -
-
, i f . . .Then. . .Else, D O . . . Loop, F o r . . . N e x t , Select
. GOTO .

Call
call sub, Function, -
( DLL).
: [ C a l l ] - [ [ ( ] [ ) ]
call .
call,
, : call P r o c m a i n i o ) .
Call , -
.
,
. , -
, . -
.
. -
,
.
Call ,
.
:

Call Procmain(" "}

sub:
Sub ?rocmain(Any3tring)
MsgBox AriyString
1
: .
End Sub

lf...Then...Else
i f . . .Then.. .Else -
.
552 lit.

: -
(). ,
I f . . .Then. . .Else.
:
If Then [ ] [Else ]
, -
, Then Else, .
.
,
True () False ().
True, TO [ ],
[ ].
: if x>io Then X=Y+I : Z=X+Y : K=Z+I
:
If Then
[]
[Elself -n Then
[]...]
[Else
[]]
End If

if
End i f . if, End i f , Else, Elself
. -
, Elself. -
.
, -
.
, , -
, Then. , -
Elself. ,
, Then.
E l s e l f ( E l s e l f ) , -
Else. , Then
Else, , End i f .
:
if A<10 Then
=1
Y=l

V
15. Visual Basic 583

10. X = l , Y = l ; 10, 100,


=2, Y=2, =3.

Do...Loop

VBA .
D O , . .Loop.
:
DC [ ( W h i l e | U n t i l } ]
[]
[ E x i t Do]
[]
Loop
Do
^]
[Exit Do]
[]
Loop [{While | Until} ]

, DO Loop,
, , Loop.
w h i l e () -
, True. -
until ()
, f a l s e .
, True.
w h i l e u n t i l DO
. w h i l e umil
Loop , -
, . . , -
, .
.
584 III.

Exit DO ,
Loop. Exit DO ,
.
Exit DO
D O . . . L o o p , -
Exit DO. Exit DO
If...Then...Else.
,
. , -
,
.
E x i t Do.

<Esc> <Ctrl>-KBreak>.

Recordset stab. -
Recordset
MoveNext.
,
. EOF, -
True, .
Do Until stab.EOF
< >
stab.MoveNext
Col=Col + 1
Loop
MsgBox " " & Col & " ", vbOKOnly


DoCmd
DoCmd , -
Access VBA.
, ,
. ,
OpenForm DoCmd , GoToRecord -
, ,
. .
DoCmd :
[Application.]DoCmd. [, ...]
15. Visual Basic 565


, -
. . -
,
. , openForm ,
.
,
, -
:
DoCmd.OpenForm "", , ,"[_]^''"

,
, :
DoCmd.GoToRecord acForm," ", acNewRec

GoToReccrd, Dccmd -
GoToRecord, :
DoCmd.GoToRecord [, ] [, 1 [, ]

:
:
(), acQuery (), acForm ();
, -
, .
, -
:
D : acPrevious
(), acNext (), ac?irst (), aci,ast (-
), acGoTo ( ), acNewRec ().
acNext;
D ,
acGoTo. acNext
acPrevlous, ,
.

VBA
VBA -
VBA.
. -
, ,
.
586 III.

VBA, -
. VBA
, ,
. , -
, , -
. -
Access VBA ,
Windows. Access
VBA :
(Modules) (New) -
.
;
(Code) , -
().
();
, -
|| Visual Basic (Tools|Macro Visual Basic Editor);
(), , -
, ,
, (Build).
() .
Access, , -
, View Microsoft Access -
. Access -
File|Close and Return To Microsoft Access.

VBA
, , ,
.
, -
, . -
.
. -
-
.


Project
. , ,
, -
. , . .
15. Visual Basic 587

, ,
(, I5.6).
Project -

3g, ( )
- JS Microsoft Office Access Class Objects
_
_
_
_
_
Forrn_TOBAP
Report ^
Report _
Modules

Modu!e2

. 15.6.

, -
. .
, Access
.
,
, , -
(Event Procedure) -
. VBA,
, ,
.
.
(Code) -
, , -
.
.
, -
, . -
, , ,
.
.
View Code , -
. View Object
588 III.

Properties . -
Access .
, Hide
.
View|Prodject Explorer


Properties
, , . . -
. -
View|Properties Window -
. ,
.

Properties -
_ __
Alphabetic [^tegotized j

. 15.7. ,

Properties -
_ FormJlOCTABKAJUIAH ~|
[Alphabeticj| Categorised j
_
AfterDelConfirm
AfterFinalRender
Afterlnsert
AfterLayout
AfterRender
AfterUpdate
AllowAddfcions True
AllowDatasheetView True

. 15.8. ,
15. Visual Basic 589


View Object.
, VBA
.
, . -
-
, Alphabetic Categorized
(. 15.7, 15.8). -
, , -
"+" "".


Code -
VBA, .
,
, .
, -, -
.
. -
( Object) .
General -
. , -
. ()
(). (
Procedure) ,
.
Declaration , () -
Declaration .
-

.
: -
Full Module View Procedure View.


Object Browser
(, -
) , , ,
(. 15.9 15.10).
,
.
, -
590 III.

Copy to Clipboard,
.
.
. -
View Definition
.

- Object Browser


< Libraries:*
Access
ADODB Members of'___
DAD
stdole ? 40
1
a|VBA 24
Hoc 1.1 K.I .1|>') ? 25
& Form ^ ^
1> _'
__ i1 __
oil _|1
;& Fomi_TOBAP

ProjectriocTiiK.1
:'(__200419.1

. 15.9.

- Object Browser

Classes Mernbers of'Command 1


| Command iS1 CornmandText
j#J CommandTypeEnur ^ CornmandTimeout
&> CornpareEnurn jS1 CommandType
Connection -* CreateParameter
ffi ConnectModeEnum
ff1 ConnectOptionEnurr Name
Function Execute)[RecordsAffectetf. [Parameter^. [Options As Long = -1]) As R
Member of ADOPB.Comniumd

. 15.10. ADO
15. Visual Basic 591


Object Browser ViewjObject Browser. ,
<F2>.
, , -
, . -
"?".
, -
Object Browser,
:
,
Project/Library, ;
Classes ;
Members of ;
G , Search Text, -
.


sub Function
, . -
VBA.
, -
(Modules) (New).
VBA .
-
Insert]Module. ,
-
(Code).
-
.
- Function
(. 15.11), (. 15.12) -
.
-
. , -
preimer Argi
Arg2:
Function Preimer(Argl,Arg2)

Function , -
-: End Function. -
592 ///.

, -
(. 15.13).


Rt enerall 3
!*

j ||>rob.i

Option Compare Database J.


Option E x p l i c i t

A
Function p r o b a ( )

. 15.11. ,

- ,_{(1)
(General) *', Pieimei

Option Compare Database


Option E x p l i c i t

Function P r e i m e r ( )

End Function

. 15.12.

- _ (Code)
uGeneial) )einier

Function Ptreimer ( A r g l , A r g 2 )

End F u n c t i o n

. 15.13.

VBA -
Insert]Procedure. ,
, , -
, -
(. 15.14).
15 Visual Basic 593

Add Procedure

Name: j
Or

Type
Cancel
>' Sub
'' Function

f" Property

Scope

* Public
f
"* Private

Local variables as Statics

. 15.14.
VBA

VBA, ,
,
Function End Function. , -

.
- sub.
,
. -
.
Sub End sub.

:
1. .
2. ,
.
3. (Properties) .
4. ,
(Event).
5. , .
6. -
[ ].
594 III.

7. (Build). -

, .
. -

(Build Event). (Builder) -
(Code). ,
.
-
sub E~d sub.
. -
.
.


-
.
. -
, Access VBA,
, -
.
, -
. , -
Auto Quick Info ( )
Editor Options,
Tools.
, -
.
Auto List Members Options.
List Constants, -
Edit.
, -
, -
Auto List Members. List
Properties/Methods
Edit.
,
,
. .
Editor Format -
Options, Tools]Options.
15. Visual Basic 595

, -
. -
-
"_''
Options
. Default to Full Module View
Editor
. -
Auto Syntax Check -
, Require Variable
Declaration . -
.

, , -
, -
, .
. Access
, -
.
, -
- -
.
.
.
, ,

Debug|Compile < >.



. , , -

.
. -
-
Debug|Toggle Breakpoint Toggle
Breakpoint Edit Debug.
. -
, -

20 5
596 III.

, , ,
.

( )

stop <Ctrl>+<Break> .

, -
Quick Watch Debug. -
Quick Watch,
. Add, -
. -

, .
, Run
Sub/UserForm Run .
, , -
, , Toggle
Breakpoint Debug.
-

Immediate Print Debug. , -
Debug.Print < , Immediate
, . Im-
mediate View|Immediate Window.

HaVBA
,

VBA , -
, Access. -
, .
, -
,
, -
: (AutoForm: Columnar),
_, :
(AutoForm: Tabular).
15. Visual Basic 597

, -
, .
-
-
(Open the form and find specific data to display)
_, -
. ,
(. 15.15).

001
17LG
587,00.
5%
,...,,.

: >*

. 15.15.

, , -
,
, . -
.
,
. . -
,
(Build Event).
(. 15.16), . -
" (Click)
".
sub. -
Sub 3aKa3aHO_Click ;) ,
.
.
, sub End
Sub:
DoCmd.OpenForm stDocKame, , , s t L i n k C r i t e r i a
.
598 III.

** - Form_TOBAP (Code)
.
- I Click

Private Sub _11: ( )


On Error GoTo __11

Darn stDocName As String


Dim st-LinkCr iteria String

stDocNatne = ChrW{1055) & ChcU(1083) & ChrU ( 1072 ) ChrW(1085)

stLinfcCriteria = "[_]=" "' " 6 ![_]


DoCind. OpenForrn scDocName, , , s t L i n k C r i t e r i a

E x i t Sub

1:__11]:
HsgBoy Err . Description
Resume Exit_3aKa3aHo_Click

End Sub

. 15.16,
' Click

Docmd Access,
. OpenForm ,
. 1. -
, -
, .

stDocName, , , s t L i n k C r i t e r i a .
Dim:
Dim StDocName As String
Dim stLinkCriteria As String

stDocMame, stLinkCriteria -
string.
,
.
,
:
stDocName=ChrW(1055)fiChrW (1083)SChrW(1072)&ChrW{1085)
TOB]="& 5![ TOB]S"'"
15. Visual Basic 599

, , -
, -
__ .
VBA
,
Forms ! [] .
, , . -
DoCmd openForm ,
.
.

-
. ___111: -
.
Exit sub
End Sub, ,
. -
:
MsgBox . -
Err .Description , -
. Description Err. -
Description
;
Resume -- ,
. ,
, .

,

, , -
. ,
, . -
(. . 15.16)
:
600 III.

If OTBGT=vbCancel Then
Exit Sub
End If

. ,
MsgBox. MsgBox (. 15.17)
, _
, (Cancel).
1 2 ,

If Then
[]
[Else
[]]
End If
(True
False), . , -
, Exit sub, -
, End i f . -
vb VBA.

Microsoft Office Access

17LG ?

. 15.17. MsgBox

" " -
DoCmd.OpenForm. . . acFormReadOnly.
,
Access.
Forms! [TOBAPJ ,
-.
,
, "[_]=" & ' s ![_] & "".
stLinkCriteria -
.
15. Visual Basic 607



,

.
_ ,
__ .
-
-
_
: [ F o r m s ] ! [] ! [_] (. 15.18).
-

(. 4):
, -
, ,
-
;
, _
, .

_
_ _
_
_

: _
;
: []*[_]
: [Forms]! []! [ _]
:

. 15.18.

602 III.


-
-
.

DoOnd OpenQuery.

, , -
, -
. ,
, , , ,
(. 15.19), , , -
, .

Microsoft Office Access

. 15.19. MsgBox


: if . . .
Then...[Else...] End If.
, , -
(True False), TV .
.
1. .
2. . -
(After Update) [ -
] .

.
private Sub 4EHA_AfterUpdate() (. 15.20) -
.
3. ,
, , -
Dim:
Dim stDocName As String, stDocNamel As String, stDocName2 As String
Dim Integer
15. Visual Basic 603

X - Form_TOBAP (Code) L ,i

P r i v a t e Sub _cecUpdate()

End Sub

3SN

. 15.20.

4. , -

=;" ?", vbYesNo)

vb
VBA, -
.
5. ,
, , , Exit
Sub, ,
:
If OTB6T=vbNo Then
Exit Sub
End If

,
, , Then -
Exit Sub,
, snd i f .
6. -
.
DoCmd OpenQuery.
.

:
stDocName^" "
stDocNamel="Pac4eT "
tDocName 2= " "
DoCmd. SetWarnings False
d. OpenQuery (stDocName]
604 III.

DoCmd.OpenQuery (stDocNamel)
DoCmci. OpenQuery (stDocNarae2)
DoCmd.SetWarnings True

Setwarnings False -
.
.
,
. 15.21.

. - _ (Cade)
1 AfterUpclate
.
On Error GoTo Err__IJEHA_AfterUpdate
:
Dim stDocHaioe As String, stDocNaroel As String, stDocNarne2 As String
Dim As Integer

= (" ?", vbYesMo)


If = vbNo Then
E x i t Sub
End If

stDocNaroe = " "


stDocNarnel = " "
stDocWame2 = " "

DoCmd.SetWarnings False
DoCmd.OpenQuery (stDocNarne)
DoCmd.OpenQuery (st-DocNarnel)
DoCmd.OpenQuery JstDocNanieS)
D o C m d . S e t W a r n i n g s True

Exit_L(EHA_AfterUpdate:
E x i t Sub

__terUpdate:
NsgBox E r r . D e s c r i p t i o n
Resume E x i t _ q E H A _ A f t e r l l p d a t e

End Sub

. 15.21.

7. VBA Access,
FilejClose and Return to Microsoft Access.
15. Visual Basic 605

8. . .
, .
9. , -
. stDocName,
stDocNamei, stDocName2 . -
, .

,

, (. 15.22) -
( )

(. 15.24).

AJ,

- v!'

. 15.22.


SQL:
SELECT ._ FROM
GROUP BY ._;
(. . 15.24)
. _ (
) _ ().
1. -
,
. 2, -
CnMCOK2_AfterUpdate() :
Private Sub CnHcoK2__Af terUpdate ()
End Sub
606 ill.

2. MsgBox ,
. -
Dirr, otvet AS s t r i n g . , -
MsgBox:
Otvet=MsgBox("Bac , " &
![2] & " ?", vbOKCancel)

,
.
2 ! . , -
.
VBA, -
(Cancel).
3. i f . . .End if

Exit sub, ,
If Otvet=vbCancel Then
Exit Sub
End If

4. DoCnd
QpenForm. , -
, :
DoCmd.OpenForm "", , , "![_]
=Forms![ ]!;2]"


2 :
Private Sub CrracOK2_AfterUpdate(;
' .
Din Otvet As String
1
, MsgBox
Qtvet=MsgBox f " , " &
_![2] & " ?", vbOKCancel)
' If...End If
' ,
If Otvet=vbCancel Then
Exit Sub
End If
1
,
' *
15. Visual Basic 607

DoCir.d.OpenForm "", , , " ![_]=


Forms![ ]1[2]"
Exir. Sub
2nd Sub

,
"-", -
. 15.23.

Microsoft Office Access

, - ?


J
. 15.23. , MsgBox

,
, . 15.24.

: 1 > 1 >.lJ>*l 3 ()

. 15.24. ,



ActiveX ,
. ,
,
608 III.

, , . ,
, ,
', .
:
Private Sub Form_0pen(Cancel As Integer)
' 2
DoCmd.OpenForm "2"
' Today
' 12
Forms!2!12,Today
End Sub

_ :
Private Sub ____11 {Cancel As Integer)
1
,
_=Forms ! 2 ! SuieMeHTActiveX2. Value
End Sub


.
,
.

. -
, . . -
, -
.
,
.


,
" " .
, , -
_ _.
.
,
. , -
. , -
. 15.25.
15. Visual Basic 609

-'
-

. 15.25.


Seek DAG.Recordset.
.Recordset , -
.
OpenRecordset Database .
seek
.Recordset, . -
, ,
. -
Index . Recordset Seek.
: -
Database , -
, .Recordset
, . seek
OpenRecordset
,Recordset Database .



:
Private Sub KHonKa_Click{)
'
Dim * As Database
Dim rstHaioraflHan As .Recordset
1

Dim strHOM_HAtOl As String
Din strKOfl_CK As String
1

Set dbsnocTaBKaToBapOB=CurrentDb()
'
1
rst
610 _ III.

Set -1=! . CpenRecordset ( "


" , dbOperiTable )
1
PrimaryKey,
' _+_; .
1:, Incex=" PrimaryKey"
' ,
' (. . 15.26)
_= Input Box ( " ", " "!
strKX}n_CK=InputBox! " ", " ")
1
Seek, ,
'
'
rst . Seek "=", strHOM_HAKJT, strKOfl_CK
'
'
If ., Then
' *'
" tie !"
Exit Sub
End If
1
(. . 15.27]
MsgBox " " & !: ! [_] s ", " &
! [_] & " " & ^! [^] ,
vbOKOnly, " , Seek"

-
.
1. ,
. -
.
2. (Click)
() P r i v a t e Sue
_11) .
3.


.
15. Visual Basic 611

4. -
Set.

Set dbs!locTaBKaToBapOB=CurrentDb ( )

Database
,
5. -
.
cpenRecordset Database
^:
Set 1=5.OpenRecordset
( "" , dbOper.Table )

6. seek, index
. seek
, . , -
PrimaryKey _+_.
1:. Index="PrimaryKey"

7. _ _
inputBox,
.
. -

_ strKOfl._CK:
strHCM_HAKn==InputBox (" ", " ")
strKOfl_CK=InputBox(" ", " ")

InputBox
. 15.26.
inputBox ,
. , -
. ,
( ).
8. seek, -
^. ,
,
:
Seek " = ", strHOM , strKOfl CK
612 III.

9. NoMatch
. True,
, False . -

i f . . .Then. . .End if
.
10. , -
. , -
(Cancel) -
inputBox (. 15.26).
<Enter>, inputBox
. (Cancel), -
. if -
, inputBox, ,
, -
.
11. -
, . 15.27.

. 15.26.

, Seek

-, 01 09,03,2004

. 15.27.
15. Visual Basic 613



, -
(. 15.28). -
-
.
_ : ,
_ .


, (After
Update) .


2
IFDD 3,5

360,00.

[
%

20
7 200,00.

10

. 15.28.


. (Event)
(After Update) [ ]
. -
(. 15.29) Private sub
UEHA__AfterUpdate()
=* __

.
614 HI.

(After Update)
, -
-
(Save Record) (Records)
.

- - Form_TQBAP (Code)
: I AfteiUHate '
Option Compare Database
pptjion

Private Sub TEK_OCT_BeforeUpdate(Cancel As Integer)


= * TEK_OCT
End Sub

Private Sub UEHA_AfterUpdate()


= * TEK_OCT
End Sub

. 15.29.

__.
TEK_OCT_AfterUpdate ( ) .



, -
__ (. . 6.22
6).
,
(_), -
( _)
( _)
_ .
I. ^ _
_ __
( )
(After Update) :
Private Sub KOJl_noCT_AfterUpdate ( ]
' ,
15. Visual Basic 615

' )
'
Forms![__]._=Forms!
_[___] . _ -_
1

_=*_
1

'
1

2. ,
.
3. _
-
(Delete) :
Private Sub Form_Delete{Cancel As Integer)
Korms![__]._=
Forms![__]._ -_
End Sub

4. Form_Deiete
.
(Event) (Delete)
[ ]
.




" "
,
. (_ ) -
()
(_) (_). -
.
, -
-
. , -
616 III.

-
.
, -
,
, -
, .

, (. 15.30).
-
(After Update) .

003

HDD Maxtor 20GB

[1 230,00.

: | < \

. 15.30.

Private Sub 4 E H A _ A f t e r U p d a t e < )


:
1. : Database
, , DAO.Recordset -
, .
DAO.Recordset
,
. DAO. Recordset ,
SQL.
Dim dbs As Database
Dim stab As DAO.Recordset

2. Set
dbs currentDb ( j ,
stab .
OpenRecordset Database,

j
DAO Recordset
Recordsets, Database. -
Recordset .
15. Visual Basic _ 617


, . . .
Set dbs=CurrentDb{)
Set stab=dbs.OpenRecordset ("", dbOpenTable)


ADO Recordset
:
Din rst As New ADODB.Recordset
rst."", CurrentProject.Connection, adOpenKeySet,
adLockOptimistic

3. , ,
:
MsgBox " " 5 _ " " ,
vbOKOnly


_ . , ,
. 15.31.

Microsoft Office Access

001 1000

. 15.31. MsgBox

4. stab
Do U n t i l <> <> Loop-
Until () DO
,
, False, -
, Loop.
stab.EOF. EOF
stab, . . , -
.
Do Until stab.EOF
<>
Loop
618 III.

5. ,
,
_ .
. -
, Edit.

6. , -
MoveNext.
stab.MoveNext


. -
.
7. , , , -
, :
If stab!KOfl_TOB=KCfl_TO3 Then
stab!-* stab!_
stab.Update
End If
i f . . .End if _ -
,
, :

stab;
update, .
8. .
Dim col AS integer,
, : 1=. , -
i f . . .End if Then,
1, coi=coi+i.
9. Recordset -
close, , , -
:
stab.Close

10. -
:
" : " , Col, vbOKOnly
(. 15.32).
15. Visual Basic 619

Microsoft Office Access [X]

EMO ; 2

i o"k" l]

. 15.32.

1.
, -
(. 15.33):
Dim stiDocName As String
Dim stLinkCriceria As String
stDocName=""
stLinkCriteria="[_] S " " Me![_] S
DoCirid. Open Form stDocName, , stLinkCriteria


Aj
> JT001 JC01 4 j 4 000,00.

[ 001 |02 16 | 16000,00.


# ] | 0[ 0.00. _J
_
: | >'- ][ 1 > | |>#| 2()

. 15.33.

12. Private Sub


:;EHA_Af terUpdate ( ) :
Private Sub UEHA_AfterUpdate(]
On Error GoTo Err_JIEHA_AfterUpdate
'
Dim dbs As Database
Dim stab As DAO,Recordset
1

Dim Col As Integer
1

Dim stDocName As String
Dim stLinkCriteria As String
620 III.

' dbs
Set dbs=CurrentDb()
' Recordset
1
stab
Set stab=dbs.OpenRecordset("", dbdpenTable]
1
Recordset ,
1

1
,
1
(. . 15.31)
MsgBox " " & _ & " " & , vbOK-
Only
1

1=0
' Do Until ... Loop stab
Do Until stab.EOF
'
stab.Edit
'
If 51_=_ Then
Col=Col+l
'
Stab! CTOHMOCTb=UEHA*stab ! TSKJ3AITAC
1

stab.Update
End If
1

stab.MoveNext
Loop
' Recordset
stab.Close
' (. . 15.32]
KsgBox " : " & Col, vbOKOnly
1

' (. . 15.33)
stDocNarr.e="3AriAC"
'
stLinkCriteria="[KOfl_TOB]=" & "'" & Me![_] S "'"
'
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_M"EHA_Af terUpdate:
15. Visual Basic 621

Exit Sub
Err_nEHA_AfterUpdate:
MsgBox Err.Description
Resume Exit_ UEHA_AfterUpdate
End Sub

13. , , -
, -
VBA DebugjCompile .
14. Access, FileJClose and Return to Mi-
crosoft Access.
15. , -
, , .
16. ( ) Recordset
stab SQL,
, _.
Set stab=dbs.OpenReccrdset -
;
Set stab=dbs.OpenRecordset("SELECT * FROM " &
"WHERE _='" & Forms ! !_ & )

SELECT ,
_ _ .
Forms! !_ !_,
. .
.
17. -
, ,
if .. .Then . . .End i f ,
.
18. , .


" " VBA
,
_ .
Access VBA
CreateForm Application, Form.
createForm .
622 III.

, -
RecordSource.
, SQL-.
( s t r i n g ) .

createControi, (
) ( Label).
:
,
;
;
, ;
(Detail section);
,
;
,
TextBox, Label;
;
.
Access.
intLabeix, intiabeiv,
intDatax, intDataY , -
.
,
.
Sub (}
1

Dim frm As Form
1

1

Set frm=CreateForm
'
.=""

'
Dim ctlLabel As Control, ctlText As Control
'
Dim intDataX As Integer, intDataY As Integer
15. Visual Basic 623

Dim intLabelX Integer, intLabelY As Integer


'
'
intlabe!X=100
intLabelY=100
intDataX=100
intDataY=500

' - _
'
Set ctlText-CreateControl (frm.Name, acTextBox, , "", "'^",
intDataX, intDataY)
1
_
Set ctlLabel^CreateControlffrm.Name, acLabel, ,
ctlText.Name, " ", intLabelX, intLabelY)
1

DoCrrd. Res tore
End Sub

:
'
Debug.Print frm.Name
1
( )
ctlText.Name=""
1
Immediate Windows
Debug.Print ctlText.Name
'
DcCmd.Close acForm, frm.Name, acSaveYes

.
Visual Basic Run Sub/UserForm
Run. Run Macro|Run.
-
.
.
, Immediate Visual Basic
View|Immediate Window.
Access, -
"!", -
; (. 15.34) , .
624 III.

DP ! : 3
1

^
(

: | f j| 7 > _>#] 7

. 15.34. ,


" " VBA
.
.
,
.
:
Database, ;
TabieDef, ;
Field, ;
index, .
1. Database, TabieDef,
Field index, -
.
Dim dbsnocTaBKaTosapOB As Database
Dim tbl As TabieDef
Dim fiel As Field
Dim indl As Index

2. TabieDef
createTabieDef
dbsnocTaBKaToeapoB, Database. -
Field , -
, createFieid -
tbl, TabieDef:
Set dbsIlocTaBKaTQBapOB=CurrentDb ( )
Set tbl=dbsnocTaBKaToBapOB.CreateTableDef("")
Set fiel=tbl.CreateFieid("", dbText, 3}
^. Visual Basic 625

3. (
ziel) Fields, TableDef, -
Append :
tbl.Fields .Append f iel


, , -
, .

4. -
fiei Fields:
Set f i e l = t b l . C r e a t e F i e l d { " " , dbText, 15)
: . Fields .Append f iel

5. TableDef (
tbi) TabieDefs -
Append:
. TableDef s .Append tbl

6. :
, , -
, , , ,
-
primaryKey. create index -
TableDef:
Set indl=tbl.Create Index("PriraaryKey")
,
( ) i n d i . c r e a t e F i e i d ( " T A B H " ) , -
.
Fields, -
T a b l e D e f , index:
indl.Fields.Append indl.CreateField("")
.
Primary True:
indl.Primary=True
(
indl} TableDef:
tbl.Indexes.Append indl
7. :
Private Sub KHonKa_Click()
On Error GoTo Err Click
626 III.

Dim ! Database
1

Dim tbl As TableDef
Dim fiel As Field
Dim indl As Index
Set dbsnocTaBKaToBapOB=CurrentDb()
'
'
Set tbl=dbsnocTaBKaToBapOB.CreateTableDef("")
' 3 ,
1

Set fiel=tbl.CreateField("TAEH", dtoText, 3)
' Fields TableDef
' Append
tbl.Fields.Append fiel
1

Set fiel=tbl.CreateField("tO", dbText, 15)
tbl.Fields.Append fiel
' TableDefs Append
.TableDefs.Append tbl
1
PrimaryKey
Set indl=tbl.Create Index("PrimaryKey")
1
, ( ),
'
indl.Fields.Append indl.CreateField("")
1

indl.Primary=True
'
tbl.Indexes.Append indl

Exit_KHonKa_Click:
Exit Sub
Err_KHonKa_Click:
MsgBox Err.Description
Resume Exit_KHonKa_Click
End Sub

Access , ,
, . -
15. Visual Basic 627

,
, primaryKey. , -
.
8. , ,
. 15.35.

Microsoft Office Access

'' ,

' ;-

. 15.35. ,

, -
;
On Error GoTo __11
:
Err_KHonKa_Click:
MsgBox Err.Description
Resume Exit_KHOriKa_Click

Err.Description MsgBox -
, Description Err.
.


, -
Recordset, ,
.


SQL
SQL,
Execute Database.
I. Database -
:
Dim As Database
Set dbsnocTaBKaToBapoB=CurrentDb()
21 835
628 _ III.

2. (DDL) CREATE
TABLE Execute Database. -
-
:
. Execute "CREATE TABLE "
& "( CHAR (3) CONSTRAINT PRIMARY KEY, CHAR (15),"
f, " DATETIME) "

CREATE TABLE . -
-
.
SQL, .
CONSTRAINT
.

(
(_},
.

3. CONSTRAINT -
(DDL) CREATE INDEX:
. Execute
"CREATE INDEX ON () WITH Primary"


(DDL) -
, Microsoft Jet. -
Create ().


, -
.
- ,

_. -
.
-
, .
,
(. 15.36).
15. Visual Basic 629

. 15.36.

1. ,
Private Sub _"terUpdat-M) .
. -
.
, -
.

-
.
,
.
stab ,
, .
stabi
.
Recordset Do Until . . . .Loop.
, -
, ,
.
2. ,
. -
, -
On Error GoTo .
If Err.Number=78'74 Then . . . End If
7874,
DeieteObject Docmdt
D o C m d . D e i e t e O b j e c t acTable, "" -
, .
630 III.

2008, -
.
,

.
-
.
3.
i f . . . T h e n . . .End if. .

2008, . .
7874,
. ,

.
Private Sub _^^ ()
On Error GoTo
' & , :
Dim dbs As Database '
Dim stab As Recordset '
Dim stabl As Recordset '
Dim tbl As TableDef '
Dim fiel As Field '
'
Dim Col As String
1

If ' " & Me! [], vbOKCancel) =_
vfaCancel Then
GoTo Exit_l
End If
1

' , 7874.
' !:
1

:
DoCmd.DeleteObject acTable, ""
!:
' .
Set dbs=CurrentDb{]
15. Visual Basic 631

'
' TableDef -
Set tbl^dbs.CreateTableDef("")
1

1
15
1
fiel
Set fiel=tbl.CreateField("", dbText, 20)
' Fields TableDef
1
Append
tbl.FieIds.Append fiel
'
Set fiel=tbl.CreateField("", dbText, 30)
tbl.Fields.Append fiel
' TableDefs Append
dbs.TableDefs.Append tbl

'
1
OpenRecordset, SQL ,
' ,
Set stab=dbs.OpenRecordset("Select _,_ _
from WHERE _='" & Me! [] S ""']
1
OpenRecordset
Set stabl=dbs.OpenRecordset("")
Col=0
' Do...Loop
' Recordset
1
(Until),
' EOF
Do Until stab.EOF
Col=Col + 1
1
AddNew
1
stabl.AddNew
1

' stab
tabl!-stab!_
s t a b l ! ^! 11_
' .
' Edit AddNew
stabl.Update
1
stab
632 III.

stab.MoveNext
'
Loop
MsgBox " " & Col & " ", vbOKOnly
'
DoCmd.OpenTable ""
1
Recordset
' ,
stabl.Close
stab.Close
Exit_l:
Exit Sub

'
:
If Err.Kurriber=7874 Then
GoTo ! ' Resume Next
End If
If Err.Number=2008 Then
DoCmd.Close acTable, ""
GoTo ' Resume
End If
KsgBox Err.Number & Err.Description
Resume Exit_l
End Sub

. 15.37.

m :
' '
-
-
-

: 3

. 15.37.

15. Visual Basic 633


1.
?
2. ?
3. ?
4. --
?
5. ?
6. ?
7. -
?
8. ?
9. Access
VBA ?
10. Docmd , ?
11. ?
12. ?
13. ?
14. ?
15.
?
16. ?
17. ?
18. VBA, Access?
19. -
?
20.
?
21.
?
22. -
?
23. -
?
634 III.

24. seek?
25. seek?
26. ?
27.
?
28. -
?
29. ?
30. ?
31. ,
Seek?
32. -
?
33. ?
34. , ?
35. ?
36.
?
37. ?
38. Recordset?
39. , -
?
40. -
?
41. ?
42. ?
43. VBA DebugjCompile <!
>?
44. -
, , ?
45. ?
46. ?
47.
?
48. ?
15. Visual Basic 635

49. ?
50. TabieDefs ,
?
51. SQL -
?
52. SQL ?
53. SQL -
?
54. SQL?
55.
?
56. ?
57. ?
58.
?

1. .
2. O b j e c t Procedure.
3. Sub.

4. Sub End Sub.

5. .
6. .
7. Exit Sub.
8. Dim.
9. DoCmd.
10. OpenForm, OpenQuery.
11. Forms![ ]![ ^
12. .
13. MsgBox.
!4. Integer.
15. , .
16. .
17. InputBox.
636 ' III.

18. vb, .

19. i f . . .End i f .
20. DO. .. Loop.
21. On Error.

22. D e s c r i p t i o n E r r o r .

23. , , DoCmd.OpenFcrm. Err . D e s c r i p t i o n .

24. R e c o r d s e t .

25. .
26. .
27. Recordset.

28. Set.
29. .
30. OpenRecordset D a t a b a s e .

31. .
32. Index.
33. PrimaryKey.
34. NoMatch.
35.
.
36. Recordset.
37. , , SQL.
38. Recordsets D a t a b a s e .

39- EOF.
40. Edit.
41. Update.

42. MoveNext.

43. .
44. TableDef, Field, Index.
45. CreateTableDef Database.
46. CreateField TableDef.
47. Fields TableDef.
48. Primary, True.
15. Visual Basic 637

49. create index TabieDef


. C r e a t e F i e l d Index .
50. .
51. Execute.
52. Create Table.
53. Create Index.
54. .
55. AddNew.
56. Update.
57. MoveNext.
58. Number Err.
16

-
Access: , , , , , -
.
,
, -
.

-
.
,
, .
, -
,
.

.
, . .

. ,
, . . -
, .
-
, VBA. -
,
. , -
, -
.
16. 639

, Access, -
,
.

. -
. -
,
: , , , ,
.
, Access.
.
.
, ,
" ". -

, .
.

, -
, :
, , , . .
Access
, .
, 6, , -

, , .
.

. -
-
, -
.
, -
-
. -
, , ,
, .

, , -

, -
640 HI.

Access.
. , -
, -
, -
.




.
,

, . 16.1.

. 16.1.



. -

. 16.2.
16. 641




1 -





-

/ \

. 16.2.

| |
(Tools]Utilities]Switchboard Manager).
(Switchboard Manager), -
, , -
(. 16.3).

?\ 5 . ?

. 16.3.
642 .

(Switchboard Manager) -
(Main Switchboard (Default))
(. 16.4).

:
- ( )
...

...

. 16.4.


.
.

-
.
( )
(New). (Create
New) (. 16.5) (Switchboard Page
Name) .

:
[

. 16.5.
16. 643


.

.
( 16.6).

;
( ( )
,..

...

. 16.6.

, -
.

(Make Default).
.

.



.

, .

(Switchboard Manager)
(Edit).
(Edit Switchboard
Page) (. 16.7)
644 ///.

,
(Switchboard Name).


;

(

;
.,.

. 16.7.
()

, ,
:
, ;
, :
, , , -
-
.




-
(Edit Switchboard Page) (New) (. . 16.7).
(Edit
Switchboard Item) (Command)
(Go to Switchboard) (. 16.8).
(Switchboard) ,
.
.
(Text) : -
(. 16.9).
16. 645

'


:





. 16.8. ()

_; [ i:
; [
^J
:


[

. 16.9.

. -
(Items on this Switch-
board) (Edit Switchboard Page)
(. 16.14).

: [

; 5 I








.. 16.10.


: .
646 ///.

-
-
(. . 16.10),
(Design Application).
(Switchboard Manager)
. , . .
,
. -

] (ToolsjUtilities).
,
(Exit Application),
(. 16.11). , -
.

_:
:








. 16,11.

,
, , , -
.
. 16.12.
-
(. 16.13) ,
.
-
(. 16.14)
(Items on this
Switchboard) (Edit) (Delete).
,
(Move Up) (Move Down).
16. 647

: [_|[][[
| |
^
V




.
-. ,
? " '.
. F1 .
! |
_


v.

. 16.12. ,

; [ , Q^

: | -I


: |3 I

. 16.13.


16.14.

:
..,

, . ,

. 16.14.

648 1.

,
(Cancel).
.

(Switchboard). -

(. 16.15) .

LJ

J .

. 16.15.



, ,
,
, (. 16.16)
.

, (Edit
Switchboard Item) -
, (Command)
, (Switchboard)
. -
.

,
.
16. 649

1 ^^^
:

( )
., .

^^^^^

. 16.16.


, -
, ,
.
(, ) , , .
, , -
,
.
(Edit Switchboard Item) -
(Command):
(Open Form in Add Mode);
(Open Form in Edit Mode);
(Open Report);
(Run Macro);
(Run Code).
-
(Edit Switchboard Item) (,
), . ,
(Command) (Open
Report), (Report),
.

,
.
,
650 III.

(Edit Switchboard Page) -


(New).
(Open Form in Edit Mode) (. 16.17), -
(Form). -
. (Text)
.

: [ /

; [ -I

. 16.17.

(. 16.18) -
-
,

., .
.

]|

. 16.18.

1
-
, -
, .
16. __ _ 65 1



Access , -
, , .



, . -
.

(View),
.
(Picture), , -
. , -

(Image). -
. -
(. 16.19)
(Format) (Picture) -
. -
(BMP, GIF, JPG . .),
.
,
,
(Picture).
(Insert Picture) , -
, . -

. -
: . -
, , -
. . 16.20
,
.
652 III.

S? : Picture

Picture
,
[ j j j j
E:\DocuSnsnts and 5afctings\UBB\MoH \ \! _DELLAximX5.jpg d








, ,

4,735
8,413
.,.,,,
, 8421376



, . ,

. 16.19.

jjj

J .

. 16.20.

Access

-
.
16. 653

] -
(Tools(Startup). (. 16.21)
/ (Dislay Form/Page) .

: /;
; ;
: R

--,.,

: :
( ) ! ( ) v
Access ?
15* /

"/ Access
( ,
Visual Basic, )

. 16.21.


. ,
Access ,
.
: , ,
, , . . ,
.


-
, ,
-
,
Access. , , ,
-
, .
, ,
] / (View)
Toolbars]Customize).
654 III.

Access. (Menu Bar) -


(. 16.22) :
(Allow Showwing/Hiding).

.>;?
:

" ''."
[ !
!?

. 16.22. Access


Access
, ,
.
, Access.

-
(. 16.23) (New)
, , ,
1.
-
.
(Commands)
(New Menu) (New
Menu) (. 16.24). -

.
. -
,
, (. 16.25).
16. 655

| [

;
.,,
" -
"
"
~
*
"
.,.




~0
_
| :


. 16.23.

[ '

,
&
: :
' Teh * j





-

ActiveX

| ..,

. 16.24.
656 III.

> ( **
- |;

_i>:~.,:4ii:>i L ''.

.-. SKC '.

' >n< : "?.. - ".

. -iV. ,

. 16.25.

* '
f. ... CtH+0

,\6
.
; !

11^


J .,,

' ! ..,
jj ,,.
,
*-J: ,.,

< J" (

. 16.26.
16. 657

-
-
(Commands).
(Commands)
. . 16.26 -
(Open) .
(. . 16.21)
.
, .
, , ,
(Display Database Window) -
Access (Use Access Special Keys).
,
.
, -
.-


Windows Access -
. -
,
. Access
Access .
Access -
. ,
. , -
-
. .
" "
. 16.27.



oe.mdb

. 16.27.

,
, .
Access, .
658 lit.


.
" " . 16.28.


'
'
(
)
^

. 16.28,




, ,
.
, ,
.

(Forms) (New).
(New Form) (Design).
.
. -
() , ,
.
.
,
.
, ,
.

.
,
.
. -
6.
16. 659

30 , ,
, , , , -
. -
Access
Visual Basic. " " {On
Click) .
, -
, , .

-
(Build Event).
, _ ^
, , ,
, . 16.29.

Microsoft Visual Basic *


: File |dit View Insert Debug Run lools Add-Ins Window Help

M - _ (Code)
j

End Sub
Private Sub __11] ( )
On Error GoTo Err_KHonKa__norosop_CIick

Dim stDocNaine As String


Dim stLinkCriteria As String

stDocH&me = ""
DoCmd. OpenForm stDocMartte, , stLinfcCriteria

E x i t Sub

___11::
HsgBox Err . D e s c r i p t i o n
Resume ^___1

End Sub

. 16.29. ,

22 S35
660 til.


1. -
?
2. ?
3. ?
4. , ,
Access ?
5. ,
,
?
6. ?
7. -
?
8. ?
9. ,
?
10. ?
11. ?
12. ?

1. .
2. .
3. , , , ,
, ,
.
4. | (Tools Startup).
5. .
6. .
7. .
8. VBA .
9. (On Click).
10. , Access.
11. .
12. | ).
17



Access -
.
-
, -
,
,
.
Access
.
, , -
. ,
, : ,
, , -
,
,
- ,
, .
"-
".


-
, .
-
, . .
.
,
. -
662 III.

().
.
. -
. . , -
,
. ,
. .

- .



, ,
() , -
.

:
() () ;
;
( );
;
.
,
: , ,
, -, , ,
. ,

, .


-
.


-
,
( ). -
. -
,
17. 663

. -
.

, , , ().

, .
,
.

-
-
- :
G ;
;
;
- ( );
;
! .
, , , -
.
. -
, .
.
()
" " "-" (). -
,
, ,
.
, -
.
( ) -
- (), .

. , . . -
,
" ".

. 17.1.
664 III.



"

"
-

. 17.1. "- "



() ()
" "
" ".
-

, -
.
' ,
. -
(, , -
) .


. -
, -
17. 665

.
.
-
. -
-
, ,
- . -
. 17.2, 17.3, 17.4.

2002

. 17.2. ()

2002 2002

. 17.3.

0 //

2002 2002




./.

. 17.4.
666 III.

-
, , -
, -
.
. -
- . ,
, , ,
-.


,
,
().

" ". ,
, ,
, .
.

"", . -

-
.

. -
, .
""
, , -

( ).


, ,
. ,

- . -
, , ,
, .

- () .
17. 667


-
(), -
. .
. ,
, .


-
.


"",
,
.


(
) "",
" ", " ".
,
, -
. -

.




, .
, -
-
, , -
,
.
2, -

. ,
668 III.

, . . -
.


, -
, . 17.5, 17.6, 17.7.


.
.

. 17.5. " "

.
()
.
-
( , 2 0 % , %).
. -
. , -
.

. 17.6. " "

(/)

. 17.7. " (/)'


17. 669

. -
, ( ).
, ,
:
, .
,
. ( -
) , .



, -
. -
.
(, .) ,
.

. -
.
(/).,
,
, , , , ,
, .
. , -
: .
-
(. 17.1).

. 17.1,

,

_
_

_
_
_
670 III.

. 17.1 ()


(
) . ,
, -
.


,
.


- " " . 17.8.
17. 671

( )

_ 200 .

- 200 .


. .
% . ()

1 2 3 '\ 5 6 7 8 9


-.


-.

. 17.8. () " '



, .


() : ( -
, , ( ),
, ), -
( ( )). -
( ), -
( , ).
:
; , :
672 _ III.

, , ,
-

.
, 2, . -

-
.

(_)
(_). ())
: (__),
(__), (__) ,
, -
.
(_) -
. (_)
(_).
(_) _ (_). -
(_) (_).
-, , -

. : , -
( ), ( -
), ( -
).
, , -
( + ).


, -, ,
, -
, .


, -
, . . -
, -
. :
(_), (_),
(_), (_) -
(_). - , :
-17. 673

(),
(__), (_), -
(_), -
,
-
.

, , -
(). -
. 17.2.

17.2.

,
() ()
_ _

_
_

_





_ .

_ .

_ .

_

_ .

()

_ .

_
674 III.

17.2 ()

,
() ()

_ . _


.


_


_ _

_
{ )


__
_


, -
: , , . -

. -
, , .

.

-
. 17.9 - "-",
,
"- ()"
" ".
- -
17. 675

, ,
-.

- 200 .







. .
. .
.
.
.

_
() _
.


.
- .
. % %
()
1 2 3 4 5 6 1 8 9 10

.. .

. 17.9. "-"

, -
. ,
, -
. -
.
-
(_). - (_), (),
(_), -
(_), (__),
(), (__) -
-. , -
- (_)
23 . 835
676 III.

-
(. 17.3). _
- ( ).

17.3. -

, -
() ()
_ .
-
_
_

_
__

___


, -
.


" "
.
.
,
-. : ()
, , , , -
, -
. -
.
:
: , ( ),
, , ;
: , -
( ),
, ( , ).
17. 677

( ),
( , , , ),

.
"
" .

()
. -
, ,

. , -
. -

, , -
.
.
,

(. . 17.9), ,
. 17.4.

17.4.

,
() ()
_ _

_
_
_

'
678 III.

17.4 ()

,
() ()

_ _
(-
_

_ )
_
__
_
_

-
"- " -
" ". -
, -
,
-.

-
. ,
, -
. -
-
.
-
.
( )
. : (),
( ), , (),
- ( ),
, , -
-.

_ (- )
17. 679

- . (. 17.5)
- ( ).

17.5. - ()

,
() ()

_
- -
_

_

_
_1
_




" " (. 17.10), -
, ,
. -
(), (), -
. , ,
,
. ,
( ),
.
, . . , -
.
-
.
680 III.

" " -
(. 17.6).




i
.




:
.. :

. 17.10. " "

17.6. " '

_

17. 681

17,6 ()

,
^

_
_



_

__


()
()
" ", -
.
.
, -
,
, , .


.
,
( ), -
, , -
, ( ), ( ).
" "
(. 17.7).
682 III.

17.7. " "

,

_

_ - _

_
_
__
___

_
_


-
(), . 17.11,

.
( -
)
. ,
, , , -
, - (, - . .), ,
.
( ) -
.
() .
, -
(. 17.8).
17. 683

.

. . 01 .

! ;. ; .
.
, , , , ,

. 17.11. " "

17.8. " "

,

_



,
_

_
_
_

684 III.


() -
, -
.

. ,
, ,
--.
.
- ,
-,
- . -
,
-
. . 17.12
(- ) "- ".

. 17.12. -
"- "
17. ___ 685

()
:
;
;

;
.


,
( ), , -
.


1:. -
: ---
( "") ,
( "").

,
1 1

. _ _ _ ^ _ _
_ _ _
-_ _
1 V- *
*_ _
0-< ^
_ _ _
_ 1 _

=_ _-
1^_
. '

1_ _ _ ,', ! 1_
..06 6_
*- _ ~1 .
_ ^ _ _ 1
1_'
^ _ 1
.
_ ^
__ - _
_ _
_ m

HCW_CTP B_i4_HflC _

|
!
__ *_
PHAKJ] Bcera.HQC
__
1_ _ __1-
1 _ -
1_

.
_>1 I
__ . _^, _- |
-1_ __ . _
_ -_1
_^_ _fb_HflC
_
/.^.'^

. 17.13.
" - "
ggg III.

, -
. -
, -
.


, -
. ()
, .
- -

. -
(. 17.13) , -
. -
, ,
.


"- "
"-
", -
.

.



, ()
() ,
.
, , -
, , -
-
. -
, .
-
Access.
, -
.
17. . 687


().
. -
-
. , -
. " -
" , -
. -

.
-
,
. -
. -
, , .
-
.



"", -
, -
.

, -
-
- .


, ,
, -
- (""), -
. -
-
Access.

:
I. :
, ;
-;
;
668 III.

;