You are on page 1of 124

yahia

124 1

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.1 AddMenu
AddMenu:

) : .
(. ) : Access
(. ) :
Access .
.(.
.

) : .
(.SHIFT+F10 ) :

.
(. .
.

) :
.(.
Microsoft Access
.

) :
:
"" " " .(.

"" ) "" : .
"" .
(. " " ) " " :
" " .
" " (." ) :
(.
.


AddMenu ) Access
2 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
(
.
.

: AddMenu .

( Menu Name
) .
( "" :
). .
.
.

" ( " : ALT+F


) .
)&(
. .

" ( " :
. ).
. .

Menu Macro Name AddMenu


) ( ( :
.

) . Access
.

( :

( Status Bar Text
) .
)
.
.

3 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:
:

) : AddMenu
(. AddMenu
.
AddMenu .

.
.

.

Access :
_ .

__
.

AddMenu.


. Access
RunCommand .

RunMacro .

AddMenu
_ __

. AddMenu.

4 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Access
.


.

.
.

) (- .

)&(
. .

) :
(. AddMenu
" " . AddMenu Access
" " "
" AddMenu .
" " .AddMenu
) AddMenu
( .
AddMenu .

.
.
.
.

AddMenu Visual Basic AddMenu .DoCmd


_ __ Visual Basic
.
___ .
_ .
____ ) (
__ .

5 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

ApplyFilter .2
ApplyFilter ) :
. Access
" " " " (. ) :
.
(.access ) SQL WHERE
:WHERE SQL (. ) :
)( )( .
(. ) : Access
(. ) : Access
.
(.
. ) :
(. .

SQL WHERE .
.

: ApplyFilter .

Filter Name .
(


)
" ( " "" :
). .

( :

.
) .
.

6 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Where SQL WHERE ) ) WHERE ( :
Condition

) Where(
.
) . .

Where
.
( :
. " "
:30,000 ) > 30000.
.
.
:

! !

" " Where 255 .


SQL WHERE ApplyFilter DoCmd
Microsoft Visual Basic. SQL WHERE 32.768
Visual Basic.

" "
. " "Where .
Access Microsoft WHERE .
.

: "" )
"" : . ""
. (. "
" ) " " :
" " . " "
.(.

7 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
WHERE _ __
.

/
.
ApplyFilter .

) Access : .
(.
/
ApplyFilter " / " ) / :


(. .

Access
ShowAllRecords / .
) Access :Microsoft Access Access Microsoft SQL Server
/ .
(.adp)(. " )
:
.
"(.
____ ).(0

Access
)
( .
ApplyFilter ApplyFilter DoCmd
OnOpen . OpenForm OpenReport
.
OpenTable .ApplyFilter

: :
" Customer Phone List " .
ApplyFilter ShowAllRecords .GoToControl
.

8 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. AfterUpdate
" CompanyNameFilter ".

Where: ApplyFilter [Company Name Filters] =1


[Company
]Name Like
*] "[A A
" .

Where: ApplyFilter [Company Name Filters] =2


[Company
]Name Like
"* "BB.

Where: ApplyFilter [Company Name Filters] =3


[Company
]Name Like
"*] "[CC CC.

... ...

Where: ApplyFilter [Company Name Filters] =26


[Company
]Name Like
"*] "[Z Z
.

ShowAllRecord [Company Name Filters] =27


s
.


: GoToControl ][RecordsetClone].[RecordCount
>0

CompanyNam
) ( e




CompanyNam
e.

9 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

Beep .3
Beep .

: Beep .

: Beep : .

) :
.
.(.
) :
access .
.(.

) : (.
.

Beep Visual Basic Beep .DoCmd

CancelEvent .4
CancelEvent ) :
.
Visual Basic (. Microsoft Access
) : (.
. BeforeUpdate OnOpen OnUnload
.OnPrint

: CancelEvent .

: ) : Access
(. CancelEvent

10 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) : (.
_ . ) :
.

(. ) : .
( . Access .
CancelEvent
) : .
access (.
.

MsgBox
.

.CancelEvent

MouseDown Dirty ApplyFilter


NoData Exit BeforeDelConfirm
Open Filter BeforeInsert
Print Format BeforeUpdate
Unload KeyPress DblClick
Delete

CancelEvent MouseDown
.

OnDblClick CancelEvent
.DblClick

) Access
( . .
) :
access . (.
Access . DblClick

11 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.
.

OnUnload CancelEvent
. CancelEvent
.CancelEvent ) :
.
(. .

CancelEvent Visual Basic DoCmd .DoCmd

: :
" Suppliers" . StopMacro MsgBox
CancelEvent .GoToControl /
. /
" " .
_ ".

)]StopMacro IsNull([Country/Region
Country/Region
"/ " Null
""
.

: ]MsgBox [Country/Region In
)"("France","Italy","Spain


5 And Len([Postal Code]) <> 5
5 . .

. CancelEvent ...



GoToControl

12 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

: ]MsgBox [Country/Region In
("Australia","Singapore") And


4
Len([Postal Code]) <> 4
4 . .

. CancelEvent ...



GoToControl
:
PostalCode
) (


:
)"MsgBox ([Country/Region] = "Canada
And ([Postal ]Code Not
Like"[A-Z][0-9][A-Z] [0-9][A-

.
) . )"]Z][0-9
: H1J): H1J 1C3
1C3

. CancelEvent ...

13 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

Close .5
Close Microsoft Access
.

: Close .

Object ( :
( Type
Access.
)
Access
) . .
Access " "
(
"" : ). .
.

( Visual Basic Visual Basic:


Visual Basic for Applications
. Visual Basic

) . .

Object .
( Name
. .
)
.

)( Save . ( ) (
( ( .

: Close .

14 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
"" Close
. " "
SetWarning .

Close Microsoft Visual Basic Close .DoCmd

CopyObject .6
CopyObject ) :

.Access Access
(. ) Microsoft Access :
.
(.mdb) (. ) Access
:Microsoft Access Access Microsoft SQL Server
/ .
(.adp) (. .
.

: CopyObject .

Destination Database .
) (
(
"" : ). .
.

(.mdb) Access .
(.adp) Access
.

( :
) . CopyObject

15 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
( :
.

) . Access
.

) ( New Name .
.

Source Object Type .


) (
access " "
. "
( " " " :
Access Access.
) . .

Source Object Name .


) (
" " .
.
" " .

CopyObject
Access
.

: .

Access
" " . " " SelectObject
" " .

CopyObject " "


. .
CopyObject .

access CopyObject .htm


.htm.

16 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" " ) "" :
Access "" " "(.
) : ""
" " SQL " " (. ) "":
"" "" "
" " " (. ) :
"" " " " " (. )
: Microsoft Visual Basic
.Visual Basic (.
/ .
.
.

.CopyObject
Access .

CopyObject Visual Basic CopyObject .DoCmd

CopyDatabaseFile .7
CopyDatabaseFile SQL Server 7.0 Microsoft
) Microsoft Access :Microsoft Access Access
Microsoft SQL Server / .
.(. Access
.
.SQL

: CopyDatabaseFile :

Database " )" (mdf. . File


( Name
.(.adp) Access
)

17 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Overwrite .
( Existing File
.
)
.
. .

Disconnect Access . All


( Users
) .
. .

: .

CopyDatabaseFile
.

:
.

) " " :
Access .Access
.(.

Microsoft SQL Server 7.0


SQL 2000 .

SQL .

sysadmin SQL .

CopyDatabaseFile Visual Basic CopyDatabaseFile


.DoCmd

18 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

DeleteObject .8
DeleteObject ) :

.Access Access
(..

: DeleteObject .

( Object Type .

) access " "

( "" :
). . " ( " "
" : Access Access.

) . .

( Object Name .
) " " .
.

DeleteObject
( :
.

) . Microsoft Access
.

Access
" " .DeleteObject

: DeleteObject
. OpenQuery )
: ) (SQL )(

19 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
(. .
DeleteObject.

" " DEL


.

DeleteObject Visual Basic DeleteObject


.DoCmd

Echo .9
Echo ) : Access
.(.
) : (. .

: Echo .

Echo ( ( ( ( On
) (
( "" :
). . .

Status ( : Bar
( Text

)
) . .
"
".

: Microsoft Access
. " " .
Microsoft Access ) : .
Repaint (. .
" " .

20 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Echo ) :
.
(. ) : .
(. ) :

access .(.
.
.SetWarnings

Echo .
.

Hourglass
) "" Microsoft Windows 2000
Microsoft Windows Millennium Windows 98 Microsoft "" Microsoft
(Windows NT .

Echo Visual Basic Echo .DoCmd

: : " Add Products "


" Suppliers" . Echo CloseOpenForm
SetValue .GoToControl SetValue " Supplier ID
" " Products" " Suppliers" .
GoToControl " Category ID " .
" " "".

: Echo
.

. : Close

" : Product List "

"". : OpenForm

21 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

: " " SetValue


" ". ][Forms]![Products]![SupplierID

: SupplierID

" ". GoToControl : CategoryID

" Product List " Suppliers


"" . EchoMsgBox
GoToControl StopMacro OpenForm .MoveSize
MsgBox GoToControl .StopMacro Review
" Products " " Suppliers".

Echo :
.

MsgBox : IsNull([Supplier
)]ID



" Review Products ""
. " .




GoToControl : CompanyName

CompanyName.

22 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. StopMacro ...

"
: Product List

OpenForm
"

:
.

= ]Where: [Supplier ID
][Forms]![Suppliers]![SupplierID

" " 0.7799 : MoveSize


"
"1.8 :

"".

.10 FindNext
FindNext ) :
. ( .
) : .
" " :30,000 < (.30000
FindRecord
. FindNext .
.

: FindNext . FindNext
FindRecord .
FindRecord .

23 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.FindRecord FindRecord
) : (.
FindNext .
) : If...Then
.Select Case . (.
.FindNext

: .

FindRecord ) :
)( )( .
(. ) :
.
(.access ) : Access
(.
) : Microsoft Visual Basic
.Visual Basic
.(. FindRecord FindNext
.

" " FindRecord


GoToControl ) :
.SetFocus .
(. ) :

.
(. .FindNext

FindNext
. .
.

) : Visual
Basic . (.
FindNext .
) :
.SetFocus .

24 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
(.
. FindNext .

.AutoKeys
.FindNext

FindRecord
Find First .

FindNext Visual Basic FindNext .DoCmd

.11 FindRecord
FindRecord ) :
.
" " :30,000 < (.30000
.FindRecord ) :
. ( .
. ) :
"--" (.
.

: FindRecord .

) ( Find What .
( :

.
) . )=(
( " " :
). . .
.

25 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
)( Match ( :
. .
Microsoft SQL Server ). .
( )
( )
( ). .

( Match Case ( :
) .
). . (
( (
( . .

)( Search ( )
( )
( ).
.

Search As Formatted . ( Microsoft


) (
Access ( ( Access

( . .

.
1,234 " "
1,234 .
1234 .


-09 .2001- " "
Windows.

" " .
M/d/yy 01/9/3 Access
"" 2001 9
.

26 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" "
( :
access
SQL. __
) .
" " "
" .

" " " "


" " .

Only Current Field


) (
. . (
( ( ( .
.

) ( Find First .
( ( ( ( . .

: ) : (.
FindRecord Access )
""( . Access .

FindRecord
.
FindRecord ""
.

Access FindRecord
FindRecord . Access
FindRecord .


FindRecord
RunCommand .

27 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
FindRecord
" " ) :
Microsoft Visual Basic .Visual Basic
.(. FindRecord
) :
. : .(.

FindRecord
. .
.

) : Visual
Basic . (.
FindRecord .
) :
.SetFocus
. (.
. FindRecord .

AutoKeys
.FindRecord

.FindNext

FindRecord Visual Basic FindRecord .DoCmd

.12 GoToControl
GoToControl ) :
.SetFocus .
(. ) :
. .
Microsoft SQL Server (. ) :

28 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.
(. ) :
. ( . ) :
Access (.
) :
"--" (. .
.
.FindRecord .
"" "" " "
" " .

.access

: GoToControl .

Control .
( Name
( "" :
)
). . .

" "
Forms!Products![Product ID].

: GoToControl .

GoToControl ) :
(. . GoToRecord
. ) :
(. GoToControl
.

GoToControl Visual Basic GoToControl .DoCmd


SetFocus
.

29 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" Add Products " " Suppliers" .
Echo Close OpenForm SetValue .GoToControl
SetValue " Supplier ID " " Products"
" Suppliers" . GoToControl Category ID
" " . " "
"".

: Echo
.

. : Close

" : Product List "

"". : OpenForm

: " " SetValue


" ". ][Forms]![Products]![SupplierID

: SupplierID

" ". GoToControl : CategoryID

" Suppliers".
StopMacro MsgBox CancelEvent .GoToControl
/ .
/
" " . _
".

30 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

StopMacro )]IsNull([Country/Region
Country/Region
"/ " Null
""
.

: ]MsgBox [Country/Region In
)"("France","Italy","Spain
5 And Len([Postal Code]) <> 5
5 . .

. CancelEvent ...



GoToControl
:

: ]MsgBox [Country/Region In
("Australia","Singapore") And
4 Len([Postal Code]) <> 4
4 . .

. CancelEvent ...



GoToControl
:

31 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
PostalCode
( )


:
)"MsgBox ([Country/Region] = "Canada
And ([Postal ]Code Not
Like"[A-Z][0-9][A-Z] [0-9][A-


) .
. )"]Z][0-9
: H1J): H1J 1C3
1C3

. CancelEvent ...

.13 GoToPage
GoToPage ) :
.SetFocus .
(. ) :
Access (.
) :
.
(. .

. ""
. GoToPage
.
) :

.
.(.

32 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: GoToPage .

( Page Number .
) ( "" :
). .
. "" ""
.

)( Right
.
"".

)( Down
.
"".

"" "" "


" .Windows

: )
) :
TAB (.SHIFT+TAB( . GoToControl
.

"" "" .Microsoft Access


Page Number "" ""
. Access
.

GoToPage -1 : -2 .
.

GoToPage Visual Basic GoToPage .DoCmd

33 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.14 GoToRecord
GoToRecord ) :
. ( . )
: .
.
" " (. ) :
(. .

: GoToRecord .

Object ( :
( Type
Access.
)
Access
) . .
" "
( "" :
). . .

Object .
( Name " " .
) " " .

Record .
)(
. .

Offset ( :
)(
.
) . .
)=( . .
"" .

"" Microsoft Access


" ".

34 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
"" Access
"" . ( :
" "
"" .
) ENTER . .

" " Access


"" . Access .
.

: ) :
.SetFocus .
(.
.

""
.

.

"" .
" " ) : .
" " "" .
(. .

GoToRecord
" " " ".

GoToRecord Microsoft Visual Basic GoToRecord


. DoCmd

.15 Hourglass

35 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Hourglass ) (
) : .(.
.
.

: Hourglass .

( Hourglass On ( ) ( (
) " ( " "":
). .
.

: ) : Access
(. .Echo
Microsoft Access .

Microsoft Access " "


.

: Microsoft Windows NT
.Windows Microsoft Windows 2000 Microsoft
Windows Millennium Microsoft Windows 98
.Windows
Windows .

Hourglass Visual Basic Hourglass .DoCmd

.16 Maximize
Maximize .Microsoft Access
) :

36 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.Access Access
(. .

.Visual Basic Editor


_.

: Maximize .

:
.

Restore .

: SelectObject .

Access .
) : .
.(.
.

Maximize Visual Basic Maximize .DoCmd

.17 Maximize
Maximize .Microsoft Access
) :

.Access Access
(. .

.Visual Basic Editor


_.

: Maximize .

37 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:
.

Restore .

: SelectObject .

Access .
) : .
.(.
.

Maximize Visual Basic Maximize .DoCmd

.18 MoveSize
MoveSize .

: MoveSize .

Right
)(
. ( " ":
)..

Down
)( .

Width .
)(

Height .
)(

Microsoft Access .

38 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.


.Windows

: .
.
MoveSize .
.

: "" "" ""


" .

"" "" "" ""


.

MoveSize Visual Basic MoveSize .DoCmd

" Product List " Suppliers


"" . EchoMsgBox
GoToControl StopMacro OpenForm .MoveSize
MsgBox GoToControl .StopMacro Review
" Products " " Suppliers".

: Echo
.

: MsgBox IsNull([Supplier
)]ID



" Review Products ""
. " .

39 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:




GoToControl : CompanyName

CompanyName.

. StopMacro ...

"
: Product List

OpenForm
"

:
.

= ]Where: [Supplier ID
][Forms]![Suppliers]![SupplierID

" " 0.7799 : MoveSize


"
"1.8 :

"".

.19 MsgBox
.

MsgBox .
MsgBox ) :
(. ) :
.(. ) :
.
40 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
(. ):
.
( .
.

: MsgBox .

Message .
)(
( "" :
). . 255 ( :

.
) (. ).

Beep . (
) (
( ( ( . .

Type . . ! .
)(
.

Title ( :
)(
) . .
" ".
"Microsoft Access".

: AsgBox
.Access MsgBox .
"@".

.
. .
.

Wrong button!@This button doesn't work.@Try another.

41 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Office
.

MsgBox .Microsoft Visual basic MsgBox .

" Product List " Suppliers


"" . EchoMsgBox
GoToControl StopMacro OpenForm .MoveSize
MsgBox GoToControl .StopMacro Review
" Products " " Suppliers".

: Echo
.

: MsgBox IsNull([Supplier
)]ID



" Review Products ""
. " .




GoToControl : CompanyName

CompanyName.

. StopMacro ...

"
: Product List

OpenForm
"

:
.

42 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

= ]Where: [Supplier ID
][Forms]![Suppliers]![SupplierID

" " 0.7799 : MoveSize


"
"1.8 :

"".

" Suppliers".
StopMacro MsgBox CancelEvent .GoToControl
/ .
/
" " . _
".

)]StopMacro IsNull([Country/Region
Country/Region
"/ " Null
""
.

: ]MsgBox [Country/Region In
)"("France","Italy","Spain


5
And Len([Postal Code]) <> 5
5 . .

43 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

. CancelEvent ...



GoToControl
:

: ]MsgBox [Country/Region In
("Australia","Singapore") And


4
Len([Postal Code]) <> 4
4 . .

. CancelEvent ...



GoToControl
:
PostalCode
) (


:
)"MsgBox ([Country/Region] = "Canada
And ([Postal ]Code Not
Like"[A-Z][0-9][A-Z] [0-9][A-


) .
. )"]Z][0-9
: H1J): H1J 1C3
1C3

44 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. CancelEvent ...

.20 OpenDataAccessPage
OpenDataAccessPage ) access :access
Access .
.
(.Excel "" ) "" :
.access ""
5 Explorer ( . "" ) "" :
:
.access ""
.(.

: OpenDataAccessPage .

Data . Access Access


Page Name
" ( " "" :
(
) Access ) . .
.

OpenDataAccessPage
( :
.
) .
Microsoft Access
.

( View Access.
) . .

45 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:
Access " " ) " " :
Access .Access
.(.

access " " ) :



(. .
OpenDataAccessPage access "".

OpenDataAccessPage Microsoft Visual ABsic OpenView


.DoCmd

.21 OpenDataAccessPage
OpenDataAccessPage ) access :access
Access .
.
(.Excel "" ) "" :
.access ""
5 Explorer ( . "" ) "" :
:
.access ""
.(.

: OpenDataAccessPage .

Data . Access Access


Page Name
" ( " "" :
(
) Access ) . .
.

46 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
OpenDataAccessPage
( :
.
) .
Microsoft Access
.

( View Access.
) . .

:
Access " " ) " " :
Access .Access
.(.

access " " ) :



(. .
OpenDataAccessPage access "".

OpenDataAccessPage Microsoft Visual ABsic OpenView


.DoCmd

.22 OpenForm
OpenForm ) : Access
(. "" )
"" : . ""
. (.
"" ) "" : :
.access ""
(. ) :
(. " " ) " " :

47 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" " .
" " .(.
) : .
( . .

: OpenForm :

Form Name .
) (
"( "" " :
) . . .

OpenForm (
:
.
) . Microsoft Access

.

( View .
) PivotTable PivotChart .
.

" "
__ ___ .
___
OpenForm
"".

Filter Name ( :
(
. Access
)
" " " ) ".
. ( :
.
) access.
.
__ .

48 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Where( SQL WHERE WHERE: SQL
Condition
) . ) ) WHERE ( :
(
) Where
.
) . Access
. " " Access
WHERE .

][fieldname] = Forms![formname]![controlname on other form


.
.

Where 255 .
SQL WHERE OpenForm
DoCmd Microsoft Visual Basic . SQL
WHERE 32.768 Visual Basic.

Data Mode .
) (
"" " " . (
( (
( (
( . .

" " _
_ _ _ .
_ OpenForm
" ".

Access
_ _ _
_ .

49 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Window .
( Mode
( : .
)
" __ "
"" " ) ".
( ( ( (
( ).
.

:
" " ) " " :
Access .Access
.(.

) :
. ) (.
( )
( . ) : .
) (.
Access( . .
" " .
" " .
.

" " Access


.
.SetValue

" " ) :

(. . OpenForm
"".

WHERE .

50 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" Add Products " " Suppliers" .
Echo Close OpenForm SetValue .GoToControl
SetValue " Supplier ID " " Products"
" Suppliers" . GoToControl Category ID
" " . " "
"".

: Echo
.

. : Close

" : Product List "

"". : OpenForm

: " " SetValue


" ". ][Forms]![Products]![SupplierID

: SupplierID

" ". GoToControl : CategoryID

" Product List " Suppliers


"" . EchoMsgBox
GoToControl StopMacro OpenForm .MoveSize
MsgBox GoToControl .StopMacro Review
" Products " " Suppliers".

51 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

: Echo
.

: MsgBox IsNull([Supplier
([ID

" Review Products ""
. " .




GoToControl : CompanyName

CompanyName.

. StopMacro ...

"
: Product List

OpenForm
"

:
.

= ]Where: [Supplier ID
][Forms]![Suppliers]![SupplierID

" " 0.7799 : MoveSize


"
"1.8 :

"".

52 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.23 OpenFunction
) Microsoft Access :Microsoft Access Access
Microsoft SQL Server / .
(. OpenFunction
) :
. : ) ( )
( ) ( (. " " ) " ":
" ".
" " (. "" )
"" : :
.access ""
(. " ) SQL
( ) :
.(. " ".
) :
. ( .
.

: OpenFunction :

Function .
( Name

( "" :
)
) .
. .

Function (
: .

) . Access
.

53 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
( View .
) PivotTable PivotChart .
.

Data Mode .
) ( " " . (
( (
(
( ( . .

:
"" " " ) " " :
Access .Access
.(.

"" "
" . "
".

: " " )
:
(. . OpenFunction
" ".

)
( SetWarning
.

OpenFunction Microsoft Visual Basic OpenFunction


.DoCmd

.24 OpenModule

54 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
OpenModule ) :
. :
(. Visual Basic ) :
. Visual Basic Sub (. Function .
) : . Function Sub
. Sub End
(.Sub ) : .
FUNCTION (.Function End ) :
.(.

: OpenModule .

( Module Name .
) ( :
Sub Function
) .
.

OpenModule
( :
.

) . Microsoft Access
.

Procedure . Name
) (
( Declrations:

.
)..

" " " ".

: " "
" " . Click PrintInvoice ""

55 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" " "." " " .PrintInvoice_Click
.

) :
. .
(. .

) : Sub Function
Private . Declare
(. .

" " ) " ":


Access .Access
(. .
.

" " ) :

(. . OpenModule
.

OpenModule Visual Basic OpenModule .DoCmd

.25 OpenQuery
OpenQuery ) :
(.
) :
(.
" " ) " " :
" " . " "
(. "" ) "" :
: .access
"" (.

56 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) : .(.
) : .
. ) ! (
" " .(. .

) Microsoft Access Microsoft


:Access
. Microsoft Jet( ) .(.mdb OpenView
OpenStoredProcedure OpenFunction ) Access
:Microsoft Access Access Microsoft SQL Server
/ .
.(.adp) (.

: OpenQuery .

Query .
( Name
" ( " "" :
)
) . . .

OpenQuery
( :
.
) . Access

.

( View .
) PivotTable PivotChart .
.

Data Mode .
(
" " . ( ( :
)
.
) . ( (
( (
( . .

57 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: " " Access )
: (.
) : UNION
(. ) : SQL
.ODBC
Microsoft Jet (. _
) : SQL
) (DDL
(. _ .

OpenQuery
" " ) " " : Access
.Access (.
. .

: " " ) :

(. . OpenQuery
" " . "" "
" . " " .
)
( SetWarning .

OpenQuery MicrosoftVisualBasic OpenQuery


.DoCmd

.26 OpenReport
OpenReport "" ) "" :
:
.access ""
(. ) : (.

58 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. ) :
. ( . .

: OpenReport

Report Name .
) (
" ( " "" :
) . . .

OpenReport
( :
.
) .
Microsoft Access
.

( View . ( (
) . .

Filter Name ( :
(


. Access
)
" " " ) ".
. ( :
.
) access.
.
__ .

Where( SQL WHERE WHERE: SQL


Condition
) . ) ) WHERE ( :
) Where(

.
). Access ( :
( ( )( .
) . .
" " Access

59 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
WHERE .

[ [!] = Forms [!] ]


.
.

Where 255 .
SQL WHERE OpenReport
DoCmd Microsoft Visual Basic . SQL
WHERE 32.768 Visual Basic.

: " "
. OpenReport
PrintOut .
PrintOut .

WHERE _ .

OpenReport

" " ) "


" : Access .Access
.(.

: CLAUSE
.
.Where

" " ) :

.(. OpenReprot "
".

60 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.27 OpenStoredProcedure
) Microsoft Access :Microsoft Access Access
Microsoft SQL Server / .
(.
OpenStoredProcedure ) : SQL
control-of-flow .
SQL (. " " )
" " :
" " . " " (.
"" ) "" : :
.access ""
(. )
: .(.
" " . ):
.
( . .

: OpenStoredProcedure :

Procedure .
( Name
" ( " "" :
)
) . .
.

OpenStoredProcedure
( :
.
) .
Microsoft Access
.

61 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
( View .

) PivotTable PivotChart .
.

Data Mode .
) ( " " . (
( (
( (
( . .

:
" " ) " " :
Access .Access
.(.

"" " "


. " ".

: " " ) :

(. . OpenStoredProcedure
" ".

)
( SetWarning .

OpenStoredProcedure Microsoft Visual Basic OpenView


.DoCmd

.28 OpenTable
OpenTable " " ) "
" : "
" . " " (.

62 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
"" ) "" : :
.access ""
(. ) :
.(. .

: OpenTable .

Table .
( Name
" ( " "" :
)
) . . .

OpenTable (
: .

) . Microsoft Access
.

View .
(
PivotTable PivotChart .
)
.

Data . "
Mode
" ( ( :
(
. ) .
)
( (
( (
( . .

:
" " ) " " :
Access .Access
.(. " " ) :

(. . OpenTable

63 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" " . ""
" " .
" ".

OpenTable Microsoft Visual Basic OpenTable


.DoCmd

.29 OpenView
) Microsoft Access :Microsoft Access Access
Microsoft SQL Server / .
(. OpenView
" " ) " " :
" " . "
" (. "" ) "" :
:
.access ""
(. ) : .(.
" " .
) : .
( . .

: OpenView .

View Name .
(
" ( " "" :
)
) . .
.

OpenView (
: .

64 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) . Microsoft Access
.

( View .
) PivotTable PivotChart .
.

Data Mode .
(
" " . (
)
( (
( ( ( .
.

:
" " ) " " :
Access .Access
.(.

"" " "


. " ".

: " " ) :

(. . OpenView
" ".

)
( SetWarning .

OpenView Microsoft Visual Basic OpenView


.DoCmd

.30 OutputTo

65 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
OutputTo Microsoft Access
) ) :
"--" (. ) : Access
(. ) : Access
.
(. ) :
. : (.
) access :access Access .

. ((.Excel .

: OutputTo :

Object Type . (
) (
( ( ( ( (
Access " "
" ( " "" :
). . ( :
). .
" " .
. .

Object Name .
) (
" ".

OutputTo
( :
.
) . Access
.

Output . (*.htm.; *.html) HTML


Format
)* (txt. ) Microsoft Active Server Pages (*.asp Microsoft
) (
)Excel (*.xls ) Microsoft Excel 5-7 (*.xls Microsoft Excel 97-10
)(*.xls Microsoft IIS (*.htx, *.idc), (*.rtf) Rich Text

66 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
(*.htm; *.html) Access (*.xml) XML .
MS-DOS . access
( HTML: HTML World Wide
Web. HTML
) . .
access. Microsoft
Internet Information Server Microsoft Active Server (Active Server
Page (ASP):
HTML) .( :
( ( )( .
) .( :
.
) access.
. Access .

Output File .
) (
(asp, .htm. html., .htx, .xls, .txt, .rtf., ) xml.
" " .
Access
.htx .idc .asp .
access Access .html .
" " Access .

Auto OutputTo Start


) (
" " .
( Access: Excel ) xls.
( Microsoft Windows Notepad ) txt.( Microsoft Word rtf.).
html. .

Template htm. html. htx.


( asp.. File HTML
) Access.

Encoding HTML.
)(
MS-DOS Unicode ) Unicode (UTF-8 .MS-
DOS . Access
Windows

67 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
HTML.

: Access .
Access rich-text
.Microsoft Word

HTML Access HTML


. " " ..html

Access :

.idc ) ODBC :ODBC



(.ODBC SQL .
Access SQL
Access .ODBC

.htx SQL .idc


.HTML " " .html ..htx

" " .htx .idc .html


Access .

" " Access .asp


. " " .asp
.html Access . " "
.html ..asp

OutputTo
" " ) " "(:

. ) :
. .
Microsoft SQL Server (.
Access ) OLE :OLE OLE
. OLE OLE "" Windows
Microsoft Excel .(.
.

68 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) :
.
(. ) :
access
.SQL __
(. / ) ) : / .
(.
) "" :
.access (.
) : .
((. ) 1( ) 0(.

) : .
(.
) " " : Access
.
) : 2,048( .
(#subaddress#address#displaytext : ) :
HTML World
Wide Web HTML .
Gopher Telnet (.FTP ) MS-DOS
(.

"" ) "" :
. "" .
(. "
" ) " " :
" " . " "
(..


) (.xls ) .rtf .txt (.html .
. .
Excel
Sum .

69 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) ) : Sum Count Avg Var
(. (Sum .

) : (. .
) : (. .asp
) (.

access HTML ..html


HTML .html .


.
.

OutputTo
. .
" " .
.OutputTo

.
.OutputTo

Office MS Excel
MS Word Excel .Word

OutputTo Microsoft Visual Basic OutputTo


.DoCmd

.31 PrintOut
70 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
PrintOut ) :
.Access
Access
(. . ) :
"--" (. ) :
Access .
(. ) : Access
(.
) access :access Access .
.
(.Excel ) :
. :
.(.

: PrintOut .

( Print Range . ( (
) ( ( (
" " " "(
"( "
"" : ). .
.

( Page From . .
) .

) ( Page To . .
.

( Print Quality . .
) .
.

) ( Copies . 1 .

( Collate Copies ( ( ( ( .
) .

71 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.

: .
.

) :
(. PrintOut
.

. FindRecord
.

PrintOut Visual Basic PrintOut .DoCmd

.32 Quit
Quit .Microsoft Access Quit
) :
.Access
Access (.
.Access

: Quit .

)( Options Access.
( (
( ( (
(
"( "" " :
). . .

: Access Quit ) :
.(.
72 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Access
) : Access
.(.
.
Quit "" .

.
""
.Quit

Save Access .

Quit Visual Basic Quit .DoCmd

.33 Rename
Rename ) :

.Access Access
(..

: Rename .

( New Name .
) " ( " "" :
). . .

( Object Type .

) Access " "
. "
( " " " : Access
Access.
) . .

73 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
( Old Name .
) " " .
" " .

Rename
( :
.

) . Microsoft Access
.

: .Access

" " " " Access


" " . " " SelectObject
" " .


. Rename " "
.

CopyObject .

Rename Visual Basic Rename .DoCmd

.34 Rename
Rename ) :

.Access Access
(..

74 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: Rename .

( New Name .
) " ( " "" :
). . .

( Object Type .

) Access " "
. "
( " " " : Access
Access.
) . .

( Old Name .
) " " .
" " .

Rename
( :
.

) . Microsoft Access
.

: .Access

" " " " Access


" " . " " SelectObject
" " .


. Rename " "
.

CopyObject .

75 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Rename Visual Basic Rename .DoCmd

.35 Requery
Requery ) :
.
(.
) :
.Access Access
(.
) :
(. .
.
.

: Requery .

( Control Name .
) ( "" :
). .
)! Forms !
). .
( :
"--) ".
( :
) . .

: Requery :

76 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) :
)( )( .
(. .

Requery .

) : .
(. ) :
. .(.
: ) / :
: .(. ) OLE :OLE
OLE . OLE OLE ""
Windows Microsoft Excel (. .

) : DAvg
DCount DFirst DLast DLookup DMax DMin DStDev DStDevPDSum
DVar .DVarP )( (.
.DSum

" " Requery SHIFT+F9


) :
.SetFocus .
.(. )
: (. )
.(SHIFT+F9

Requery .
RepaintObject ) : . Repaint
(.
. ShowAllRecords
) :
. Access "
" " " (. Requery.

77 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Requery Visual
Basic Requery Requery .DoCmd Requery
Visual Basic Requery .DoCmd.Requery
Requery DoCmd.Requery Microsoft Access
Requery Access
. Requery (ADO) ActiveX Data Object
.Requery

.36 Restore
Restore .

.Visual Basic Editor


_.

: Restore .

: ) :
.Access
Access (.
. SelectObject
.Restore

MoveSize .

Restore
.

Restore Visual Basic Restore .DoCmd

.37 Restore

78 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Restore .

.Visual Basic Editor


_.

: Restore .

: ) :
.Access
Access (.
. SelectObject
.Restore

MoveSize .

Restore
.

Restore Visual Basic Restore .DoCmd

.38 Restore
Restore .

.Visual Basic Editor


_.

: Restore .

: ) :
.Access
Access (.
. SelectObject
.Restore

MoveSize .

79 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Restore
.

Restore Visual Basic Restore .DoCmd

.39 RunCode
RunCode ) :
. FUNCTION (.Function End
.Microsoft Visual Basic

: RunCode .

Function Visual Basic . ( :


( Name
) .
)
.
"( " "" : ). .
.

( Microsoft Access Microsoft Access:



. Microsoft Jet) ) (.mdb

( ) " "
. " ".

: ) :
. :
(. .Access

)(TestFunction

80 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) :
. : ) ( )
( ) ( (. ) :
.
(.
" " )=(.

Access .

) : . Function
Sub . Sub
(.End Sub ) :
(. Visual Basic
. RunCode .

RunCode Access
" " ) : Sub
Function .(.
) : Access
(. ) :
Access .
(. Access
) :

(. ) :
(.
. Access ) :
. .
(.
" " ) " " : Access
.Access (.
" ".

.Visual Basic .Visual Basic

81 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.40 RunCommand
RunCommand Microsoft Access .
) : .
(. ) :
. )
( . (.
) : .
(.SHIFT+F10 Acces

: RunCommand .

)( Command .
Access . .

: Access 97 RunCommand .DoMenuItem


) : (. Access
DoMenuItem
RunCommand . DoMenuItem ""
.

RunCommand Access
) :
(.
) :
:
"" " "
.(.
Access
. Access
.Access

82 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
RunCommand ) :
If...Then .Select Case .
(. .

.
. ""
RunCommand .

Access Access .
.Access
DoMenuItem .RunCommand Access
RunCommand "" .
"" .RunCommand


RunCommand

Visual Basic
RunCommand


) .Application RunCommand (.DoCmd

.41 RunMacro
RunMacro ) :
.(. ) :
. .(.

: . .

: .

RunMacro .

( Macro Name .
) ( "" :
) . ) )

83 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.
. .
.

RunMacro
( :
.

) . Microsoft Access
.

( Repeat Count .
) ) " " ( .

( Repeat Expression( :
) .
) .
) (1 (0).
. .

: " " Access


.

.
RunMacro
.

" " " " :

" " " " .

" " " "


.

" "
" " .

84 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
RunMacro RunMacro Access
. Access
.

: .

. .
Access
.

RunMacro
) : .
(. .
) : )
( " " " " .VBA
: (.
) : .
) (.
(. ) :
.
.(.SHIFT+F10
.
.

Access . " " ) " ":
Access .Access
(. Access
.

RunMacro Visual Basic RunMacro .DoCmd

.42 RunSQL

85 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
RunSQL ) : .
.
) ! ( " " (. Microsoft
Access ) SQL/ :SQL SQL SELECT
UPDATE DELETE WHERE .ORDER BY /
SQL (. .
) : SQL ) (DDL
.(.

: RunSQL .

SQL SQL . Statement


) SQL(
255 . .

Use ( : Transaction
) (
). . .
. Access 97 Access
BeginTrans
SQL CommitTrans.
.

:
) : (.
. .
RunSQL .

SQL 255 RunSQL


DoCmd .Visual Basic SQL 32,768 .Visual Basic

Access SQL
) : ""
" / " . " " QBE
(. "" ) : ""
" " SQL " " .(.
Access SQL .

86 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
SQL

( : INSERT INTO
).

( : ) ) SQL DELETE
).

SELECT...INTO ( : ) )SQL
)(
).

( : ) ) SQL UPDATE
) (
).

) )SQL

CREATE TABLE

ALTER TABLE

DROP TABLE

CREATE INDEX

DROP INDEX

IN .

) :
(. ) :

(.
"" OpenQuery "
" ) " " :
" " . " "
.(. ) SQL SQL

87 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: . SQL
SQL (. .

SQL Access SQL


"" . SQL
.RunSQL SQL " "SQL RunSQL
Access "".

.43 Save
Save ) Microsoft Access :Microsoft Access
Access Access access
. Access
(. .
) (.

: Save .

( Object Type .
) access " "

( "" : ). .
.
" ".

( Object Name .
) " " .
" "
.


Access.

88 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: Save ) :

.Access Access
(. .
Save . .
" " " "
. Save
) : .(.

Save :

) : Access
(. "" ) "" :
. "" .
(. " " ) "
" : "
" . " " .(.

) : Access .
(. )
: .(.

) : .
: :.(. ""
" " " ".

) access :access Access .



. (.Excel
"" ) "" :
.access "" 5 Explorer
: .( . " " " ".

" " " ".

) : SQL control-of-flow
. SQL
(. " " " ".

89 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Save
) :
.
(.
.


. " " SetWarnings
.

Save Visual Basic Save .DoCmd

.44 SelectObject
SelectObject ) :

.Access Access
(..

: SelectObject .

( Object Type .
) Access
" "
" ( " "" :
). . .

( Object Name .
) " " .
" " .
" " " "
Microsoft Access "
( " " " :

90 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Access Access.
) .
" ".

" "
( Access Microsoft
Access: Access Microsoft SQL Server
/ .
).(.adp) .

In Database Window Access " " .


)" " (
( " "( (
" "( . .

: SelectObject Access ) :
.SetFocus
.
.(. .
) : Access
(. SelectObject
) :
. " __ "
"" " " (. )
) :
. (.
) : .
.((.

Access " "


" " . " "
.

.
) (Restore )
.(Maximize

91 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
GoToControl GoToRecord GoToPage
. GoToRecord ) :
"--".(.

SelectObject Visual Basic SelectObject .DoCmd

.45 SendKeys
SendKeys Microsoft Access
.Windows

: SendKeys .

Keystrokes Access .
) (
" ( " "" :
). . 255 .
.

)( Wait ( :
) . .
( ( ( ( . .

: Access SendKey
.Access

. SendKeys

" "
.


. Access PrintOut FindRecord
. SendKeys
.

92 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: SendKeys
"" : .
Access . )
(FindRecord SendKeys
.

255 Access Windows


SendKeys .

SendKeys KeyDown
KeyUp .KeyPress ) ANSI :ANSI
8 Microsoft Windows 256 ) 0
(255 . ASCII ) (.ANSI
( : . KeyPress Microsoft Visual
.Basic SendKeys .

.46 SendObject
SendObject ) :
"--" (. ) :
Access (.
) : Access .
(. ) :
. :
(. ) access :access
Access .
.
(.Excel Access Microsoft .
(*.xls) Microsoft Excel 2000 (*.txt) MS-DOS text rich-text
) (*.rtf :HTML) HTML World Wide
.Web HTML
(*.html) (. Microsoft Outlook

93 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Microsoft Exchange Mail Applications
: .(MAPI) Programming Interface


SendObject

:

( Object Type . (
) ( ( ( (
( Access
" "
"( " "" :
). . ( :
). .
" " .

( Object Name .
) "
" . " "" "
Access .

SendObject
( :
.

) . Access
.

Output . HTML Format


) ( )(*.html ) Microsoft Excel (*.xls )Microsoft Excel 5-7 (*.xls
) Microsoft Excel 97-10 (*.xls), Text (*.txt Rich Text
)(*.rtf ) Microsoft Access Data Access Page (*.htm, *.html
)XML (*.xml .
. access HTML .
Access ..

94 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) Microsoft Active Server (*.asp
) Microsoft IIS (*.htx, *.idc .

"" . " To"


Access

)
"" " "( );( ( :
) .
Microsoft
Windows.
.

)( Cc "( Cc"(
. Cc .

) ( Bcc "( Bcc "(


. Bcc
.

)( Subject . "" .
"" .

( Message Text .
) .
. " "
" "
.

( Edit Message .
) .
.
.

( Template File html..


) HTML.

: .
. Excel .xls

95 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Microsoft Windows Notepad .txt Microsoft Word ..rtf
.html :
SendObject :

. ) :
. .
Microsoft SQL Server (.
Access ) OLE :OLE OLE
. OLE OLE "" Windows
Microsoft Excel .(.
.

/ ) ) : /
.
(. ) "" :
.access
(. ) : .
((. ) 1( ) 0(.

) : access
. (.
) :
HTML World Wide Web HTML .
Gopher Telnet (.FTP
) " " : Access
.
) : 2,048( . :
(#subaddress#address#displaytext ) MS-DOS
( : . "" )
"" : . ""
. (.
" " ) " " :
" " . " "
(. :.
) (.xls ) .rtf .txt (.html .
. .

96 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Excel
Sum . ) )
: Sum Count Avg Var (. (Sum
: . ) : (. .
) : (. .asp
) (.

access HTML .html.


HTML .html .


.
.

SendObject
. .
SendObject .

.
.SendObject

SendObject Microsoft Visual Basic SendObject


.DoCmd

.47 SetMenuItem
SetMenuItem ) (
) : .
(. ) :
97 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

(. .

SetMenuItem
) : AddMenu
.(.
SetMenuItem Access Microsoft .
) : )
( " " " " .VBA
: (..
Visual Basic
) : .
(. ) :
. )
( . (.
) : .
(.SHIFT+F10.

: SetMenuItem .

( Menu Index .
) ( " " : .
16) 2(
32,768 .)32,767 0
.

"( " "" :
). .
) AddMenu
.(0
( :
If...Then Select Case.
. ) .
. .

98 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" "
" " .
) Access
" " .

Command . 0 Index
) ( " ".
( :
.
) .
)
.(0

.

Subcommand Index .
) (
( :
). . 0
"
" .

) ).0

)( Flag . (
( ( ( (
( (
( . .

: SetMenuItem
.
SetMenuItem ) :
.(.
Access .

99 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
SetMenuItem Visual Basic SetMenuItem .DoCmd

.48 SetValue
SetValue ) :
. . Microsoft
SQL Server (. ) :
.
(.
) : )
( ) ( (. Microsoft
Access ) : Access
(. ) :
"--" (. ) :
Access .
: .(. SetValue
Access ) :

.Access Access
.(.

: SetValue .

Item .
)(
(
"" : ). .
(
( :
)) .! Forms !controlname. .

Expression( :
)(
.

100 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) . Access
. .
( Salary(
Employees( 10 (
Forms!Employees!Salary*1.1. .

)=( .
Access .
( :
. :
)Variant (VarType 8 ). Variant</.

" ="String1 Access


String1. String1
String1 .

) Access :Microsoft Access


. Microsoft

" " Jet( ) (.mdb


.

:
. .

:
) : access
.SQL
__ (. .
!Forms ! .
!Reports !
) :
access .
(. .

101 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
SetValue
) :
. Access ___
(.
. SetValue
. ) : . Repaint
(. .RepaintObject
SetValue ) :
) (
(.
_ .

SetValue _
. SetValue _
) SetValue ( .
SetValue _ _
.

SetValue :
.

. SetValue
"" . !Forms . .
) :
. (.
.
. SetValue
_ _
. Visual
.Basic .Microsoft Visual Basic .Visual Basic

" Add Products " " Suppliers" .


Echo Close OpenForm SetValue .GoToControl
SetValue " Supplier ID " " Products"
" Suppliers" . GoToControl Category ID
102 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
" " . " "
"".

: Echo
.

. : Close

" : Product List "

"". : OpenForm

: " " SetValue


" ". ][Forms]![Products]![SupplierID

: SupplierID

" ". GoToControl : CategoryID

.49 SetWarnings
SetWarnings .

: SetWarnings .

103 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
( Warnings On . ( (
) ( (
( "" :
). . .

: ) :
.
(. ) :
.(. . Microsoft Access
) (
.

" " ENTER


. .

Access .

Echo .
SetWarnings .
SetWarnings .
.
.

SetWarnings Visual Basic SetWarnings .DoCmd

.50 ShowAllRecords
ShowAllRecords ) :
. Access
" " " " (. ):
)( )( .
(. ) :
(. ) :
Access (.

104 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) : .
( .
: .

ShowAllRecords :

) (
. ) :

(. ) :
.(.

ApplyFilter
/ " " " "Where
.OpenForm

) : .
) ( .
(. "" )
"" : . ""
. (. "
" ) " " :
" " . " "
.(.

ShowAllRecords Visual Basic ShowAllRecords


.DoCmd

Customer
" Phone List " . ApplyFilter
ShowAllRecords .GoToControl
.
. AfterUpdate CompanyNameFilter
" ".

105 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
:

Where: ApplyFilter [Company Name Filters] =1


[Company
]Name Like
*] "[A A
. "

Where: ApplyFilter [Company Name Filters] =2


[Company
]Name Like
B. "*"B

Where: ApplyFilter [Company Name Filters] =3


[Company
]Name Like
CC. "*]"[CC

... ...

Where: ApplyFilter [Company Name Filters] =26


[Company
]Name Like
Z "*]"[Z
.

ShowAllRecord [Company Name Filters] =27


s
.


: ]GoToControl [RecordsetClone].[RecordCount
>0

CompanyNam
) ( e




CompanyNam
e.

.51 ShowToolbar

106 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
ShowToolbar ) :
. )
( . (.
. Microsoft Access
)
"" "" ) "" : .
"" .
.((.

ShowToolbar ) :
.
(. ) : .
.(.SHIFT+F10

: ShowToolbar .

( Toolbar Name .
) ( "" :
) . Access
.
.


( )
.

( :
) . ShowToolbar
( :
.

) . Access
.

)( Show

107 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. )
).


Access
) Access(
Access.


Access


Access.

: ) :
If...Then .Select Case .
(. .

_
ShowToolbar .
__ ShowToolbar
. ShowToolbar
.


___ ) (0 Visual Basic
Visual Basic .SetOption

ShowToolbar Visual Basic ShowToolbar .DoCmd

.52 StopAllMacros
StopAllMacros ) :
(. .

108 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
: StopAllMacros .

: .
) : If...Then Select
.Case . (.
) :
(. .
) (-1 Microsoft Access .


. StopAllMacros
.

Echo SetWarning ) : Access


(. StopAllMacros
.

.Microsoft Visual Basic

.53 StopMacro
StopMacro ) :
(. .

: StopMacro .

: . )
: If...Then .Select Case
. (. ) :

(. . (-1) True
Microsoft Access.

) : Access
(.

109 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) :
.(.
) :
.
Order Date(.
. MsgBox StopMacro
. Echo SetWarnings ) :
Access (.
StopMacro .

. crosoft Visual Basic

" Product List " Suppliers


"" . EchoMsgBox
GoToControl StopMacro OpenForm .MoveSize
MsgBox GoToControl .StopMacro Review
" Products " " Suppliers".

: Echo
.

: MsgBox IsNull([Supplier
)]ID



" Review Products ""
. " .




GoToControl : CompanyName

CompanyName.

110 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. StopMacro ...

"
: Product List

OpenForm
"

:
.

= ]Where: [Supplier ID
][Forms]![Suppliers]![SupplierID

" " 0.7799 : MoveSize


"
"1.8 :

"".

.54 TransferSQLDatabase
) Microsoft Access :Microsoft Access Access
Microsoft SQL Server / .
(.
TransferSQLDatabase Microsoft SQL Server 7.0
SQL Server 7.0 .
.SQL

: TransferSQLDatabase .

)( Server SQL Server 7.0 .

( Database .

111 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
)

Use SQL. Trusted


Connection
.
(
.
)
.

SQL
Windows 2000 .

( Login .
)

" " .
) Access (Password .

Transfer . Copy
( Data

)
. .

) ( .
.

: .

TransferSQLDatabase
:. :

sysadmin ) (.

SQL Access
SQL 7.0 .

TransferSQLDatabase Visual Basic


TransferSQLDatabase .DoCmd

112 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia

.55 TransferDatabase
TransferDatabase Microsoft
) (.mdb) Access : .
(.
) (.adp) Microsoft Access :Microsoft Access Access
Server Microsoft SQL / .
(. .
Access ) :
Access .
(. Access .

.

: TransferDatabase .

Transfer . Type
) (
"( "" :
). . .

.(.adp) Access

Database Type .
) (
Microsoft Access
. Microsoft Access .

Database Name .
) (
. .

FoxPro
Paradox dBASE .
"( " ( "" )).

( ODBC ODBC:
" ) " ( ODBC
) . , (Open

113 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Database Connectivity (ODBC):
. ODBC Structured Query
)Language (SQL ) .
) ((ODBC :
) . . ( :
Access Access) . Access
.
"( " "" :
:
access. ""
) .
( : Access
. ""
). .
.

ODBC ""
ODBC ODBC.

( Object Type . Microsoft Access


) " "
Access " "
. .

.

( :

) . Access
( :
) . .

.

)( Source Access
. FoxPro Paradox dBASE

114 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
. ) ) dbf. .
.

Destination Access
)( . FoxPro
Paradox dBASE . )
)dbf. . .

" " " "


Access .

Access
. "" ""
Access " "1.

Access Access
.

Structure Only
) (
. . .

: Access .
Access . Access
. ) :

.Access Access
Access (. .Access

(.mdb) Access
. .


. .

TransferDatabase
" " ) " " : Access .Access
(.
. Access

115 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.
) (Access
.
TransferDatabase .

FoxPro dBASE FoxPro dBASE



. Access ) (.inf
) Microsoft Office .(Files\Microsoft Office\Office 10 C:\Program
. TransferDatabase
FoxPro dBASE Access .


TransferDatabase Microsoft Visual Basic
TransferDatabase .DoCmd

.56 TransferSpreadsheet
TransferSpreadsheet Microsoft
) Access :Microsoft Access
. Microsoft Jet( )(.mdb
) Access :Microsoft Access Access Microsoft SQL
Server / .
(.adp)(. . ) )(:

(.Access Microsoft Excel Access .
, Access
.Excel Lotus
3-2-1 Access :


TransferSpreadsheet
.

116 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) ( Transfer Type .
( "" :
). .
.

Access (.adp).

( Spreadsheet Type .
) .
Microsoft Excel 8-10.

Lotus .WK4 )
( Access .
Access Lotus
.WKS 2.0 Excel
. 2.0 Excel
Lotus .WKS
Excel Lotus 1-2-3
Access .

) ( Table Name Access


.
( :

)Access . .
.

" " Access


.
Access .

Access ( SQL/ SQL:


SQL SELECT UPDATE DELETE
WHERE ORDER BY.
/ SQL ).

TransferSpreadsheet. SQL
" ".

117 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) ( File Name
. . .

Access
Access.
Access
5.0 Excel .
Access
.

5.0
Excel
"".

( Has Field Names .


) Access
Access
. Access
. .

Access

.

)( Range .
.

( A1:E25 A1..E25 Access 97
( .
5.0 Excel
Budget!A1:C7.


. .

: .Access Access
) : (.
.
118 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Access .

) :
. ""
"" ( . .

) " "
(.


) " " : Access .Access
(.
. Access
. Access
. TransferSpreadsheet
.

Excel "" Access


Excel "" .

TransferSpreadsheet Microsoft Visual Basic .57


TransferSpreadsheet .DoCmd

.58 TransferText
TransferText Microsoft
) Access : .
(.mdb) (.
) Access :Microsoft Access Access Microsoft
SQL Server / .
(.adp) (. . )
)( :
(.Access Access .

119 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
Access
.
: .(.*html) HTML HTML
:.Access


TransferText
:.

( Transfer Type .
) ( :

) . ( :
) .
HTML.
Microsoft Word
Word
.

HTML
HTML
Word Windows HTML
"( "
"" : ). .
.


Word Windows
.(.adp) Access

( Specification Name
) .
( schema.ini :
)( ) .
.

120 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia



MDY .

" " " " " " .

.
.


. Access
. Access

. /
HTML
.

) ( Table Name Access


. ( :
.

) Access access. .
.


HTML Access
. Access
.

( SQL/ SQL:
SQL SELECT UPDATE DELETE
WHERE ORDER BY. / SQL
) .
TransferText. SQL
" ".

121 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
) ( File Name .
. .

Access Access.
Access
.

HTML
" ".

( Has Field Names .


) Access
Access .
Access .
.

Access
Word Windows .

Access ( :

) .
Access
.



/ .

Access
.

HTML Table Name HTML .


) HTML ( " "
HTML HTML.
HTML.

HTML

122 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
> <CAPTION <CAPTION>.
> <CAPTION
<TITLE>.
Access
12.

) ( Code Page ( :
.
ASCII
) ASCII.
( :

.
)..

: Access .
Access ) :
(. .

Access .

) :
. ""
"" ( . .

) " "
(.

" " )
" " : Access .Access
(. .
Access .
HTML
. TransferText .

/ Access
. .

123 124

PDF created with pdfFactory trial version www.softwarelabs.com


yahia
.

.Access


) : .
.(.

TransferText Visual Basic TransferText .DoCmd

124 124

PDF created with pdfFactory trial version www.softwarelabs.com

You might also like