You are on page 1of 226



  

            !  

) 567 84)
"# $$)   '   + !  ,  / $0 ) 1 ..
!  ' : "! 0! ! :   ;7= < 0 !AB ? ) 7>= C 
!A0' ;? <4 =  ! <DE : ! " <! : !  :? ?7 857 " 'A
'?A  ?  'A  A4  . B    ;7! <4 !AB
 ?O MN = .. L
 ! A 8 BR ') 'E ! " B ! <4
/T S 8N; 8 !! ! R ') ' 8 B ! A 5 ! '  :! V
 ' 8N ; /T S ! V0)W ;7;  ,O ! "
 ! VR A A$ A ;7 ! : !AB
 =E  V ;E0 ..]\ ! : A ;7 < A$  8 B; !AN :
 =; 'A0 =^ )L !AB =  56 .. 5 <6) 80% =B!AN :
 R ) B' \4 bR=0 < ?; 'A\  B=A$  =$ < ..
=O  !  ) c? ? 8E ! 8E  .. +! <4 =$ .
 ! A A$ ;7! <4  <C=^
 A$ ;7! <4;  5= ?O  !! 57! ! <  ^= ' <C ..=^
' <C  <5 V 6 5) " ..  R ! " <C : ;  " R !:
!E ) :8
 " <C " 74R ! " <C :A4O   " V ; ;7 <C
 )A0  <4B< )A0 6^! <$ \   <D E
 .. b$BR A A$ ;7 .C 8 !. <4
A  =^  +)  ;7R ! <C <4A4O  Microsoft Visual Basic 6.0 V
A ) ' \4) VR AN    '^ )L .. 57
  S  ! .; A N   < A$=; A =^ ! ;4! ;7 5
A4 N ) ' =) :    \  4! :    \  < t
=; A 'A0 =  !.. 5 :
 + 7<  6  ) V ! \$=^ N  5 Oracle 8;  \  5tO'=A   )< < 6 .
!  y< != <$A ? 7=^ N  ?A SQL Server 7 !  != 4 ! ? 7 CD 8=^ N  ~ Access . MySQL)= ' ) A AN    \  < t=; A '   5!.. :
A  =^  +)  ;7R N  ~ . Microsoft Access

::: <C ) ' B! <4A N  =;  =^ !  5 A '0 < 
A0  ..
 ' 6AA +   :
DAO
ADO
RDO
OO4O
? ..5 ! +? A  =^  5  87 5AN AN ;7  ; '< 0
 ADO; 'ActiveX Data Object ; B
! E bR= /$= ' < 0=? AN ;7  !: 8+> - <7T= - 8) BR -= ) - c>=B -?AN ! + AN  .
! E ' < 0 /$= ' ADO=^ 8 6 SQL ?A ': ; BSQL stands for Structured Query Language
 <C>=B  <?5!  <C : 5 L =' SQL
) <B>' A0  . B=! <C  5 . ' = RO ' /$! AN ;7  . ' = \6 /$ ! AN  . ' = /$ <7T ) 6 "  " ) 6 84R = ... 8) B .  <5=. B = !  O !AB  AE  <$ >= B ! <4= < A ] !
!A  =.!! "B
   <C! <4; " A4O  . " V
N  ; " !)? y7A ~ " .
' < 0 ; " . " ADO
) ' 1  R A A0 =  " A ^= ! !!AB
 ) 0
 OA? "7 bR L :
-1>. <7T
-2=. 8) B
-3R .
0 ' -4  8 4 .
-5. c
-6=0) .
. <A 4! <W -7
 <W -8 ^  . 07
 - 9  <? ;7 .
A A0 =  ! : "7 bR^A ?; ! E R   A0' C
=  ! : < < .

) <7W = !" ( :   ;7  5?< )A0 ; "   ' " RE --!< "
' " 5OE / A - y - " ' " 8 ! )?A ?" !^ .? ;78D
?" ! ^' 1 ; B) ! CD! :?  0B ;57'?7 ! y CD  5
!?  !
= !  O ) c 8)A$ 8   \D ;7 8E!A0 ;? <4 =  ! ^) O! :  =^ ! .
N  ' ;7 1  .  <$0; :=   )'; = 
  8 B
  A$ ;7! :? ! ;7! :C  7 "7 4' 1 ?
 '  ! : )  ' \4 0 ??=' 1 c 6 8   ;7 6
'?A  ! 'O< ] ! !A =' 1 ;? <!5  )?A 
$E ;7 0  +)  ;7 ...R A )?A =    ? ) \4 'c
'=W  B '  AN   ! 5!A  6 <!5...
  ;7 :! 8C= N ... 8 B ~ ?; ' V 5t bR R7 .: 5 ! =E
" N  7]< "  Blank DataBase TA! A

 =E " N  7]< " A Blank DataBase )?! ) ' V ! \$ O
 0 ) V ! \$) = <   5  ;7A =< :

" Data "  5=    0 =\  !  N O  = ) !?N
: <= < V 5t' ;? Create "  " CT Data  0  8B6 -

Create Table in Design View "  =;  7 6  " 5 ! =E


: <=; < 7  4 '  8? V 5t) A ^R5 =E B

;7 bR /$= ' <5  .. !=$ !  4=;  ))  : (( A


)  --- 1 !\ (
?=) 1 )  --- N (
 -- <OA
 ' ?7 ;7 R  S : !     8B4A ! " N ! " N
A4 : 8A 8B4' !  y  80=' N      <
 A4  "B6 ? 7 . B . N!  A4 877 . 1 '..  "B4
 = N 4   \ bR =$ :
11  FirsName
   FatherName
 GrandName  4
FamliyName  <,B
N EmpNo  A
Job  <OA
?; '  8R ? 8  ;7< =< :

8B6 N =O! A ; Primary Key  TA! A! " B>=5
! '   4  CT))  V 5t' ;? (( O< =< ' V ! \$= <
"   4 " :

8B6  4 " " Emp A=E  B  Employees OA V  CT


A!) Ok (M7 B>=5 ! '   4 ] M< ?; '  4  ;7< :

  t1R A 4 R   b =7 4  "'B= N ! )<  ;7<


=< :

B' B   "7?4= 07 <)O O N]  4  .= "=7 " '
 ' A 5tO  =0 8 ^A$ =< .
 O .. B=
B '  ' y B 4 N  6 E# " " ! ^=  " Users
A )?A "7 =< :

Note

Rows

Descreption

"

&

"

'

'

+


"

"

'

'

'

8B6  =^ " !=O ; " Primary Key  ;7< =< :

... !!  =^ ! 6 B= 0' 1


  ;? V  A4O :! ;7 8E  A  0 ! '  5=> B #
...  ]B=>  >' B ^A? ?=\ ! 56A
:! !  V TA!  6.0 V  A4O :! 8C= N
Start  All Programs  Microsoft Visual Basic 6.0  Microsoft Visual Basic 6.0
: <= < V 5t' ;?

:  = < V 5t' ;? Standard EXE ;N \N =E N

 A )?A  8 B=  ..!A : )=?A !    ; =; :


-1 A  ) ; , ( .
A  -2 = ! A6 ! =^ .
A  -3  AE .
A  -4 E  .
A  -5  8) B= c.
A  -6 ' 8) B.
A  -7  ^ <W ) <$ c !. ( <A 4
0' -8) .
A  -9   =^ ! .
A  -10 ' 8) B =^ ! .
A  - 11 ' 8) B? <  )<.
A  -12  !. :
! E R ! B :=A 6 8? "  B ' = /$ ! <! E :
' =. 50)A ' /$

::   8 B=  < ;7A4O  .. V


A     ..A ' M$^ ,=; A =  5  8
  < ! =  M' C 1] ...

 A C= N ..^ ,^ " <D  ); :


Name  frmAddEmp : 1
 =A : <7T !Caption  A

Font Tahoma  Regular  8 : ^

RightToLeft  True :  b4'

N; 7 ; 7  4' Project - Project1 R7 ;7 t .. ,^ bR 8) B' B


E ! bC'  ! ' )   E ! 1 C= N .. <;  7  
Name <D^ - Properties ,^

EmpInfromation : ;= = < N

" OA <  7T " frmAddEmp A  = ) N : <= "  /T 

: ;= 
Tools Name


Number

Note







'

'

'




'

;


: ;= Caption < E ! ] ' < 


Command1  ) 6
Command2  O
Command3  E

!


"

"

B>=5 ! ' <  O N ...  ! E   C ) ;7 O


  +: M

  A " " frmAddEmp "B6  A  CT  V 5t  O


  " " EmpInfromation "B6  A  CT  V 5t=  O<
O B   ;7< =< :

: ; B' bR /TR    TA   < " R A !  )< ?A ? <  "


 CT ! ^=' ;? No bR<
O B  A ..  ;7=   ' ..  E  = 
 C' <O  A \ ..  '?   " !  0 <0)W VR= M

A   A  :! ; ,  ;7< =< :

=E  " V 5t' ;? MDI Form< =< :

 CT " V 5t' ;? Open " =7< =< :

R ; , A  R 8D; 7 ? . =  +! ] "? A  R  t


! A  R   B ]\ A?=   / 6 A) A
: ;= A  R ,E ;7 B  : <D^ ! A ] ' <
Caption  OA ! AB! :!
: <DE ]
WindowState  2 Maximized

RightToLeft  True

: <DE ]

O V ! \$' < V 5t' A ... ; 7 O  E !  O


... 1 R5 O  CT MDI Form A 

Menu Editor <D^ E ! ,A0<  0)W .... ,A0 

: "!AB!< t!
+  8  ... ,AN " ,0 bR 8O A?' " ,N ' !  Menu Editor ; 7
 .. O ) 6 
+! "O A?) .. !
: <= A0 bR5 0\ '=4)
: + TA' / =$0 " .. " "N A?) ;O ! 0 A?' < , " ,0

: 8? R5 ='\ R   \ ,A0 bR  N


File  !
Log_Off  ... E 84 '
ExitPro  ... E
MinAdd  <7T
AddEmpMu  ... A! < 7T
MinEdit  8) B'
EditEmpMu  ... A! 8) B'
MinTool 
CrUser  ... ! ^= 
EdUser  ... ! ^=  8) B'
ChanPass  ...    < 8) B'
MinRep  )0'
PrintReport  ... OA! / A! <W
MinHelp   B=
HelpAndSupport  ...    B=
AboutMe  ... :!
<^; 7 5=?' < ? bR Files " ! " +  8  < ?\ 4 L4> 1
B  7 A?; 7 5B! 8!B='  :!; 7 < ,0  B' ;? Name
" ,A0  > A MDI Form A  A?) \ 4) : <t!
: 8? R5 ;,5  8? V 5t ,A0  B

B>=5 ! TA0A .. ,  ) 6 ?;  ;7 5B A ; ,


' /'; > <7T ) 6 :
-L CT )   )  ;0

- =E  " " V 5t' ;? " Components...< =< :

: ) = N .. <0  ; < 7 " ! A 


Microsoft Windows Common Controls 6.0 (SP4)
Close  CT V B Apply " M$' "  CT ) 6 ' A   ) t -

:   OT !  ; ; , A ; 7  A


Toolbar1
ImageList
StatusBar1
: 8? R5 A  8? A?) ;? T

A0) 8D; 7 " Toolbar1 ; 7 5O ;? < ! AD =E\   " 4)
\ ! 50! A?)
A?' A ;= !;  B \ 4) Toolbar1 AD  8N : ;= A?' A Toolbar1 ; 7
. OA! < 7T
. OA! 8) B'
. OA <  W
.  B'
. :!
. E

.. bB! L =! A0) V)  7A=' \ 4) <  A0) ' ) 6


" A0) / 6 B "
Properties 5 ! =E )  L 5 CT ImageList1  ImageList1  Properties
: <=; < 7 

<= < V 5t' ;?

" Images " Tab \)A=  V B  General : 32 X 32 A0) 0 


: <= < V 5t' ;?

 A0) 6 ) ' \4) " A0) " A = ) Insert Picture  CT
< 8+! 8? A?) ;? A< 7T B AD y \$=)  4! $=! \ 
<=

" Ok "  CT A0)= E ! 5= B


;7 A )= =^ !" = ) A N R " E Index N AD 8? : <t!
Toolbar1 
Properties =E )  L " CT Toolbar1  = ) N 1 Toolbar1  Properties

<= < V 5t' ;?

0 ! TA! A  ImageList <  < ,0 E ! ImageList1 


tbrFlat : " ! =E< DE E# b 4' Style  ! : <= < V 5t' ;? ; 7 Buttons ( Tab )  =-

" M+  ( " ) Toolbar ) A= A0)< 7T A?) A 


: ;= /'?;  
. <7T A0< 5' =) ;? Insert Button  CT . TA! A !  y Insert Button L  CT -

" "7AO ; 7 "BNA! " L !? V B'  ;  7 Index <  : 1


L   5t) ;? < 7T> " 1 " N  80=

<==\ 
Index  1
Caption  E
Key  ExitButt
Image  6
ToolTipTex  :! ! E

..+ TA'


&

'

&




&

'

" A$  5' " 7AO   R <0  < 0)$; 7  .. ; N B= A0 
Index  2
Caption  :!
Key  AboutButt
Image  5
ToolTipTex  :! !  AB!
Index  3
Caption   B'
Key  HelpButt
Image  4
ToolTipTex  :!  B= B'
Index  4
Caption  OA < W
Key  PrintButt
Image  3
ToolTipTex  A  / OA <  W
Index  5
Caption  OA   8) B'
Key  EditButt
Image  2
ToolTipTex  OA   8) B'
Index  6
Caption  OA < 7T
Key  AddButt
Image  1
ToolTipTex  OA <  7T
< V 5t' ;? R7  ^ ! Ok  CT ! = <  5= B ::
: <=

"StatusBar1" 8) B= A0  .. M+   ! '  ) 5= 8? R5


Properties 5 ! =E )  L 5 CT
StatusBar1  Properties

<= < V 5t' ;?

A  ) ;7< =; :


-1 <
-2yNA
< -3 'O
8ON -41N
-5  =^ " R  8E t "
! E <    <0 ! E  ) ' =) Style <  ... yNA
   <  ! E :
Style  sbrTime
 ;7< =<

! E L " " Insert Panel! ~ E 5 " CT ?; ' ) ;7 5O<


?; )?A !"7 <7T 5
: 1 ;7 Index 1 NR ) ; B V ;7 y  B<7T
"  < "   ;N=; :

Index  2
Style  sbrDate
Index  3
Style  sbrCaps
Index  4
Style  sbrNum
Index  5
Style  sbrText
Minimum Width: 4000.25

: ;;  " ) < " =,5  8? A?) \ 4)

  =   .. 8! 8? ; , A   ! '  5=< 0)$ bR5


.... E

! C' ? ) : <t^A  <O E ! ; , ^Picture <D

A . A0 A  <7T E#R  A "' ,7= ! N  '=A


 ! =^ > <7T A ' /=; :

=E  " " V 5t' ;? " Form< =< :

A  A = O) ;? " Form " A " "  6L! =$CT " .. V 8 CT
TA!

: ;= A  ,E   Name  frmCheckUser


Caption  t  ! )
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8

RightToLeft  True
 A  O" Save "  O N . ,^ T B
: <; 7  " frmCheckUser "

: ;= A   =<  /TA N


Tools Name


Number

#








;


: <=; < 7 

.. + 8DO'
: ' Text2 & Text3 8 A< DE 8B6
Text2  PasswordChar  *

Text3  PasswordChar  *

: Command1 & Command2 Caption <DE 8B6


Command1  Caption  O
Command1  Caption  E
87 ; 6 8? A  <0  ; < 7  M =MW E# A   ;? Save ..  O
M   A  5  OT< =; 0)$~ O .. E# A  T :::
: ;= ,^ C= N .. t   AE  =" 5! A  R
Name  frmLogin
Caption  AE 84 '
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmLogin  A  O : A   =<  T Tools Name


Number










;


: <=; < 7 

.. + 8DO'
: Text2 A< DE 8B6
Text2  PasswordChar  *

: Command1 & Command2 Caption <DE 8B6


Command1  Caption  M7A!
Command1  Caption  E
87 ; 6 8? A  <0  ; < 7  M = MW E# A   ;? Save ..  O
M   A  5  OT< =; 0)$~ O .. E# A  T :::
: ;= ,^ C= N ..A!  8) B= c =" 5! A  R
Name  frmSearchEditEmp
Caption  OA   8) B' c
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True

: <= A$^ /' ) 6 < 7T> ... <7T =  A  R; 7


: ;0 )   )  L CT

Components... < D^ < 5t' ;? " Components " "=   E
: 5    =; c
Microsoft ADO Data Control 6.0 (OLEDB)
VR
Microsoft DataGrid Control 6.0(OLEDB)
: <=; < 7 

5=7T ' ' 4=  Close  CT Apply  CT ' ) ' B
: ; ) 7

Save O  C E ! frmSearchEditEmp  A  O : A   =<  T Tools Name


Number

Note










,


: <=; < 7 

Label9  Name  lblCount


Label9  Caption  ( Empty )
Label9  Alignment  2-Center

.. B T
: <=  ,E  

: <= A$^ /' .. DataGrid  A0 


: <= ?;   Edit 5 ! =E )  L  CT
( <,B - 4 - - 1 - N)
DataGrid  Edit

' ;? Append 5 ! =E )  L DataGrid  " !CT V B 



DataGrid  Append

: <=; < 7  ~  E <7T " ! ?; )= 5 " ~ E < B

 CT E ! /6 DataGrid  = )  C ?; )A  


Properties 5 ! =E )  L DataGrid 
DataGrid  Properties

: <= < V 5t' ;?

: <   < bR; 7  )  6A)


0 N" ) ! 7AO 8 B) A B N R Column -1
B; 7 "T =) b )' R 1 R Caption -2
 N ;7 R A B\ !  = <  $) R DataField -3

: < 7T> ;= /'


Column  0
Caption  A  N
DataField  EmpNo

: <=  /T 1 N 5 ! =E Column  

Column  1
Caption  1
DataField  FirstName
Column  2
Caption  1
DataField  FatherName
Column  3
Caption  4
DataField  GrandName

: 8? R5 A  8? A?) ;? " Ok "  CT ! = <  5=> B

E# A   ;? Save ..  O


M   A  5  OT< =; 0)$~ O .. E# A  T :::
N .. " c A  E ! ;') " OA    8 )B= =" 5! A  R
;= ,^ C=
Name  frmEditEmp
Caption  A   8) B'
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmEditEmp  A  O : A   =<  T Tools Name


Number










;


: <=; < 7 

: Command1 & Command 2 Caption <DE 8B6


Command1  Caption  8) B'
Command2  Caption  E
87 ; 6 8? A  <0  ; < 7  M = MW E# A   ;? Save ..  O

M   A  5  OT< =; 0)$~ O .. E# A  T :::


: ;= ,^ C= N " ! ^=  =" "  5! A  R
Name  FrmCreateUser
Caption  ! ^= 
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmCreateUsers  A  O -

: A   =<  T Tools Name




Number

Note

#








;


: <=; < 7 

: Command1 & Command2 Caption <DE 8B6


Command1  Caption  O
Command1  Caption  E
: Text2 & Text3 PasswordChar <DE 8B6
Text2  PasswordChar  *
Text3  PasswordChar  *

: Check4 & Check3 & Check2 & Check1 Caption <DE 8B6
Check1  Caption  <7T
Check2  Caption  8) B'
Check3  Caption  <W
Check4  Caption  ! ^= ! 
: Frame Caption <DE 8B6
Frame  Caption  
Frame 8E; 7 Check CT
87 ; 6 8? A  <0  ; < 7  M = MW E# A   ;? Save ..  O
M   A  5  OT< =; 0)$~ O .. E# A  T :::
;= ,^ C= N " ! ^=  8) B' " "= 5! A  R
Name  FrmEditUser
Caption  ! ^=  8) B'
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmEditUsers  A  O : A   =<  T Command3  Text3 R 07 " .. ! ^=   A  " ~ O
Command6 Command5 Command4
: ; 5
Tools Name


Number

Note










;


: <=; < 7 

: Command1 & 2 & 3 & 4 & 5 & 6 Caption <DE 8B6


Command1  Caption  8) B'
Command2  Caption  E
Command3  Caption 

( Last Record )

Command4  Caption 

( Next Record )

Command5  Caption 

( Prevuse Record )

Command5  Caption 

( First Record )

: Text2 PasswordChar 



Text2  PasswordChar  *

: Check1 & 2 & 3 & 4 Caption <DE 8B6


Check1  Caption  <7T
Check2  Caption  8) B'
Check3  Caption  <W
Check4  Caption  ! ^= ! 
: Frame Caption <DE 8B6
Frame  Caption  
Frame 8E; 7 Check CT
87 ; 6 8? A  <0  ; < 7  M = MW E# A   ;? Save ..  O
M   A  5  OT< =; 0)$~ O .. E# A  T :::
: ;= ,^ C= N "   <    =^ C' " "= 5! A  R
Name  FrmChangePass
Caption  <  <   C'
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmChangePass  A  O : A   =<  T Tools Name

Number








;


: <=; < 7 

: Text1 BackColor <DE 8B6


Text1  BackGround  & H8000000F &
: Text1 BorderStyle <DE 8B6
Text1  BorderStyle  0-None
<=; < 7 

: Text1 Alignment <DE 8B6


Text1  Alignment  2-Center
: Text2 & Text3 & Text 4 PasswordChar <DE 8B6
Text2  PasswordChar  *
Text3  PasswordChar  *
Text4  PasswordChar  *
: Command 1 Caption <DE 8B6
Command1  Caption  O
: Command2 Caption <DE 8B6
Command2  Caption  E
E# A   ;? Save ..  O
M   A  5  OT< =; 0)$~ O .. E# A  T :::
: ;= ,^ C= N " )0' 5> <$ c =" " 5! A  R
Name  FrmPrintReport
Caption  A! / OA! <W
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmPrintReport  A  O : A   =<  T Tools Name


Number

Note










;


,


: <=; < 7 

: <t!
( <OA - 1 - N ) .. 07 <=)  N ';  7 B )
: <=< 0)$ )N '  ,E  A0 A .. R
 ) L DataGrid  CT
07 <   ( <OA - 1 - N ?;   ) Edit 5 ! =E
DataGrid  Edit
: <=; < 7 

5 ! =E   E ! CT A   CT; = )   C


 0   8) B= c <0  ) N ';  7     Properties
. <0)$ '^= A  bR= < ?
: <0)$ bR5 T
Column  0
Caption  A  N
DataField  EmpNo
Column  1
Caption  A 
DataField  FullNames
A A B R  !! N ;7 A6A! ~ A   =  ..   0; E ' A
B A  A !B A A?  = < ( 07 ) Views " + A?)
yNS 
Column  2
Caption  <OA
DataField  Job
: 8? R5 )N ';  ,5  8? A?) ;?

: <=  ,E   .. B T


Label9  Name  lblCount
Label9  Caption  ( Empty )
Label9  Alignment  2-Center
: Command1 Caption <DE 8B6
Command1  Caption  <W
E# A   ;? Save ..  O
. <$ " DataReport " )0' <7T A0 A :::
 )0' =; >/'

<0)W 5O 6 8? L\ =4) .. )0= V 5t) ;? DataReport  CT


! )0=

R  +)  ;7  5) R < B! < 5!  N 8? N)   0=  0 )) 0= 8? R


:  07  N
Page Header ( Section2 ) 
Detail ( Section1 ) "! ^=  A R E

! )0= : <!AB ] <DE   .. ;7 t  A ' 4 ) 6

  '  8 B=.. )0


 L CT )   = ;7 )0 !? : ;)! 5 ! =E

'B     CR ^ A4 ?;  = /$=?  ;7< ? ,  A6A ;7


= < 4= .. )0 bR^ N 8BO <D6 !<  T  ,A '
< B <BD "7; ! ..

: ;=) 0= ,E T


DataReport  Name  DREmp
DataReport  Caption  A  / OA )  0'
DataReport  RightToLeft  True
DataReport  WindowState  2-VbMaximized

" DREmp " " ~ O "tO) 0= O < V 5t' ;?  O
: <=; < 7 

Page Header ( Section2 )  0; 7 1


8 B A 
Label1 T
: ;=< ,E  
Label1  Caption  OA  S
Label1  Font  Time New Roman  Bold  22
Label1 Alignment  2-rptJustifyCenter
: ? Label < T
Label2  Caption  A  N
Label2  Font  Time New Roman  Bold  14
Label2 Alignment  2-rptJustifyCenter
Label3  Caption  1
Label3  Font  Time New Roman  Bold  14
Label3 Alignment  2-rptJustifyCenter
Label4  Caption  <OA
Label4  Font  Time New Roman  Bold  14
Label4 Alignment  2-rptJustifyCenter
8? R5 

Detail ( Section1 )  0  8 B A 


" RptTextBox "  =^ A

" Text1 " ,^; 7 "  A?) )0=  RptTextBox  : <t!

  57 =) ;? Detail  0; 7 )0=; 7 Text ,  A


: ;= ,^ T Text  T
Text1  DataField  EmpNo

Text2  DataField  FullNames


< + A? 80 R R 4; 7 A6A! ~ FullNames 80 
 0 !  N 
View 
Text3  DataField  Job
: )0= ;,5  8? R

A$E / ! ) ?/T AD /TA )0= M ' 8 B' /$= ' : <t!


y  V  A4O )0= VR .. \'! M ! )0= 8? A?) ;? ( ... ]
. )0= 8 B :! AN A " A)  " " ?) = :! 6A) ? 6 <)AN
87 ? . V  A4O; 7 )0= =^ / ) 1 R
<= A$^ $ Save O E !  O
M   A  5  OT< =; 0)$~ O .. E# A  T :::
: ;= ,^ C= N " V'!AB! :! =" "  5! A  R
Name  FrmAboutMe
Caption  :!
BorderStyle  1-Fixed Single
Font  Tohama  Regular  8
RightToLeft  True
Save O  C E ! frmAboutMe  A  O !AB! /' \ 4)  ... " 5]' ;=  /T; 7 ^! y A  R; 7
... ( < B! AD .. V ! >'AB! VR .. !^=R ) :!
: A   =<  T Tools Name


Number










;


: <=; < 7 

! =8? A  M ' V \4) .. <  V'!AB! /T V \4)


: <=; < 7  !'; AB! /T A  

: ;= Command1 L <D^ C= N


Command1  Caption  M7A!

: ;= 8 )  A=) R Label3 ,E T


Label3  MousePointer  99-Custom

8?  <A0) =  . :!; 7 5BTA  6 A0) V)  7A=' \ 4)


.. ;B'  "  '8   ) 5t' 8 )>" ) " ?;  !     
" ;= 8 ) 8?  <A0) V)  L6 y "
.. <A0)= O A / ! V O ?; )=5 CT  MouseIcon <DE  Label3
5!<   =^ A0)
Label3  MouseIcon

... ; 7 Save O< A0) E !  O

8 B) R A ; , A  8B4 \ 4) .. ! < =  !5! !  5= :::


...  8C' <); 7
: <D^ bR 8BO' ;? ;= /'
EmpInfromation Properties 5 ! =E Project < ,0!
Project  EmpInformation Properties

EmpInfromation Project Properties <   5t' A


: <=; < 7 

( General )\ ) A= ^= : 1



: Startup Object  E ! :  
" frmCheckUser " A   8C'  ) b )' R A   5 ! =E
.. C= O =) ;? Ok  CT
Startup Object  frmCheckUser  Ok
.5=>  87 R C'   ..  O ..  , : <t!
Save O  E ! C= O

V  A4O ( B ^ ) \ 4) A? = < 8N A = < ?6


 A0 ) !?=< >'B' " ! \$ R ..  N /!  '
.. ADO < 0'  =^ A
: <= A$^ /' .. <=?  bR) B= A0 
References 5 ! =E Porject < ,0 !
Project  References
: <=; < 7 

. Microsoft ActiveX Data Objects 2.7 5 ! =E <= < V 5t' ;?
O ? ).. D> N 5) 1
. A7  7 7 8

R7  bR ^ ! Ok  CT <=? 


Save  C  O

:::  ) 0 1= <  =C  A  ?A  \ ..  8 BR ; ..


8N  =B  B $ :
 Data Base
' N ; B  )^=  5 "" DB
 Record RecordSet
) " =^) 84 ; B " " RS
L! ] y bR5>=E ? ) \4 'A\   !B=) ;? ) 4 
  V 8 ! ! 4 t ( !!
A A0 L^! <7T ? 1 ;? CD = < ?A  =C L^  ; B
" A )Module " 8
,7 Module; ? 1 ;? : = < A ;7 8  ;7 07 R  ^L  B
 =C  8? "7 ?; ) = /$ AE   A =B   ..
 A0 ! <7T) " Module " 8>A! <7T)A ' /^A$ =< :

=E  "   5t' ;? Module bR< =< :

 CT )L! CT 8 ?; ' V =O bR< :

 A A0 ?= < A ' )B>' 0  A A0 =C=! )B
A0) "' ,7 >' 0  07?A != C Public
?A  " N ; B) DB  :

;,0= 8 ?= < ,N 5t' <$0 " . " < = 4! <0  ; < 7 : 1
: ;= A? A?) A
Public DB As New ADODB.Connection
/!  " ) 'C=  R ,7 ..  A0 'A !  C=!  7 ; B)
; )  R ' 8? ))  B= A0) VR 07  N
ConnectionString >'
JET.OLEDB   ~  =^ 0 ' 
7 A? ( Oracle ) 8 : 8+! E  0 '8?
. =^! (  'SQL Server )
: >'A ! +? +? ) R /NA  R ) V?!
http://www.connectionstrings.com
.. ;  7     +   )/6 
: ;= '" ,7 E# C=! B A
( ... - c) ' - B= - 8) B' - R - 84 <7T - 4= 7 )
RS C=   A?) A

Public RS As New ADODB.Recordset


: !  AN ,E / 6 RE) A "  0  "   N   C=  R
(  ... c) '  B=< 7T R )

ADODB.Recordset ) ! !?=< 6  M=   ; B' bR As New .. + TA'


 ]4= 7 4  ,^ RE)  C=! M =.. 6 5! ;R
 80+ 80)  C=! 0 =. SQL 8 6 ;7 5 B)  =; ) ? B!
..  " ! =4! <  <0)W bR R
R Rss "  A?) A 4  E E# C=! VR B ) : <0)$  / ) 1 ? '" )  '= ( ,7 C= 
B= 8) B= A  ;7 A?) A " .. 07 8) B= A  ;7 A?) A C=  R
: +  8  ... c A  ! ;') B=> R

Select * from emp where empno = ' 20 '


)=?1 A   8) B' A  ;7   \4) 07  <  0   /6 S  
)) !  . " RS " "  R C=  A?) A 8) B= A  ;7 ... R A  N
c) A N C'  =^
.. O) A b 4)  111 
+! N  0; 7 1
.. A6A! N
A0' <   5t' A b 6
 " <7B! ] S  < N A?'   4)  B=> A0) !   ?' <? 
  '?   ?< B=> < 0 O=) !  B=> < 0 O=) A RS  B=>
! " 8) B= A0) 84   B) 1 S  8) B=;  < 7 . 8) B=;  < 7
 V= A0) " '" ,7 Rss "  E# C=! A?) A  ?< bR 8 R
: ;= C=  R B  .. 1 A6A!  N
Public Rss As New ADODB.Recordset
! 1'  < A
1'>!; <
ConnectinString )  >'B'  N =O A0) A A
 1 R5      ! 5 ! ; >'0= ) /$= ) A  8 " PoolConnection "  A?) A ( L6 ) Sub  A
: ;= ( MS Access )  0 >'A" E; 7 A?) A
Sub PoolConnection()
If DB.State = adStateOpen Then DB.Close
DB.Provider = "Microsoft.JET.OLEDB.4.0";
DB.Open App.Path & "\Data.mdb"
End Sub

.. A? 
Sub PoolConnection()
L4  R " A6 /$=  ;? " !?8B4) A? t) " 07 "' ,7 L4 R
\$ L4 R; 7 A6A  A? 8C' ) !  .. ; B) PoolConnection A 1 07
Sub  
End Sub
If DB.State = adStateOpen Then DB.Close
.. A? R
adStateOpen " A=O! = State < DB  0 y If < 6 ! =1

.. ;= 8  Then DB.Close "A=O!  0 y
DB.Close  0 M]
< B bR 
8 B ) 6 ! 5=7   0 ] 8
O) .  0; 7 8  !A?' 1 ;?
.. C'
DB.Provider = "Microsoft.JET.OLEDB.4.0";
DB.Provider  0 /!  >'A B 
: R\ =^  >' 4) ~   N /!  ) >'
Microsoft.JET.OLEDB.4.0
:  N /! " >'E ! /$= ' ;? L  A R
DB.Open App.Path & "\Data.mdb"
Data 5   =; N =7
App.Path & "\Data.mdb"
; :!~ !  O ;7  0! 
 /T /$ ' :C  0; 7  0 ')
+!  0 !  C' 0' ; B)
.. 1'<    < 0)$ bR5
! ( B=> ) SQL 8 6 8 ) "' ,7 String A ! C=! B= A0 A
: E# A   A 
Public SQLs As String
. E# A  ;7 < 4 C= /$=  ;? B=> < 4 O=) ;? L^ '" ,7

  =^  <  O  5' ,7 String A ! )C=! )B A0 A VR


; 7 5B! 8!B= ;? "E 
:   =^ O ?; )=
Public UserNames As String
: ? <  O ?; )=
Public UserPassword As String
1~ O 8)  O 8)  O < bR V 5t' ;?  O N
. Module1

A .. )?A ? 8 ) 8  ;,5A =; :

;7 : 1  A ! .. E ) ; B


R  '4! MB )?A 8N bRA ( ' ) "!B )=4 5)=B . MB' < 6

' To Connect Data base


Public DB As New ADODB.Connection
Public RS As New ADODB.Recordset
Public Rss As New ADODB.Recordset
Public SQLs As String
Public UserNames As String
Public UserPassword As String
Sub PoolConnection()
If DB.State = adStateOpen Then DB.Close
DB.Provider = "Microsoft.JET.OLEDB.4.0;"
DB.Open App.Path & "\Data.mdb"
End Sub
:!; 7 A  ! = <  5=
<A5 ; ])< 7 !; ]\   7 '=?A 5 A 8  )=  : <t!
: A? 5   bR A \   4)

  8B4 : ; 5 B  A$E   y0 A   A ;7  8N


! ; , A 
: ;< 0)$
( " B6 ) A   MDIChild  True <D^ ] -

" 5,   A " 07 <=   


frmAboutMe
frmAddEmp
frmCreateUsers
frmEditEmp
frmEditUsers
frmPrintReport
frmSearchEditEmp
: 8? R5 ;,5  8??; )

OA < 7T> " frmAddEmp " A = A ?= < A0 A


 =; < 7  A A?) ;? frmAddEmp A   CT -

: A ! R7   =O ?; 'A   L! CT CT -

 A )= = < ?A ! <4! 1 :" ) 6AR ?A :


)(Private Sub Form_Load
End Sub
R  8?5;  A  )= ' / 6 RO 8 4 A6A ;7R L4 R 
)   =  ;7 8R
  A   ; =; :







   C A .
  C L .
 !  .
 CT . 'O
  A  .
  A .  C

? ! + 1 .

:  07   1
  =^ R  4! ;7
. ;  7  Form_Load  
.  / ! ;7  Text1_Change 
A? " frmAddEmp " A  A A0 A
8BO A !
" 1'>" ! < 0  ' "  =0 ! b R " Emp " "  R 4= O : A? R !  A? A?) A A?; = < 7  
Private Sub Form_Load()
' A? )?=\ A 
End Sub


: ;= ! A?) A 1'>; >' ! < 0=  A 1

Private Sub Form_Load()


PoolConnection
End Sub
: R= 07 < bR R' 8 " b R? A A " 1

1'> < E !  >'0= A b   ;. 07 4= 7 ; =< A$^ : ;= A 4= O ^A?

B V 5t' A?  O  VB! 8O=) A ) D A? A?) !  .. t


. ( A? 8?< O? TA=!   AB 
: " ;,5  A? 8? " 8O " = ! A?  = =8 ?
Private Sub Form_Load()
PoolConnection
SQLs = "Select * From Emp"
If RS.State = adStateOpen Then Rs.Close
RS.Open SQLs,DB,adOpenKeySet,adLockPessimistic
End Sub

: <= A; 7 .. A?  t

A? ! 
Private Sub Form_Load()
" R  8 = "  A  )<
PoolConnection
?A A "  R L4  c) A " A?  ! )  .. 1'>  <
.. 5 ! ; >'0 ?; ) =57 8E )  4) !  8;  )7 " PoolConnection "
; bR ? y  ! 1 R5 L4 R ?= <  L! ~ y : <t!
. B  7 A?< B =  ;87 R!" A5O! \ = <  4) 5 7B' +  
SQLs = "Select * From Emp"
Public SQLs As String 8);  7 b 7 R C=  R' 8
. B=> < 6 C=  R < N 07 8 4 8 ) L^ R
;7 A6A   8\ ; 6 " OA  6 ! ; B=; '  "
OA  6
If RS.State = adStateOpen Then Rs.Close
VR~
 " DB " " RS " ? V ! N A? R
.. 8BO B
/ 6 RE C=! A RS  0 !  N  C= = ] O A0) 0 ! b   A
- c) ' - R - <7T - B= - 6 =7 )  N ;7 ?= ,E
( .. 6 R - 6
If RS.State = adStateOpen
.. A=O! 4  C=! < 

Then Rs.Close
: ;)  .. ) 6 ! =O 5=) ;? C=  M] .. B 
RS.Open SQLs,DB,adOpenKeySet,adLockPessimistic
:  5 0 A RS.Open SQLs
bR 8C= N ) RO A? < 6   =7 " 4  4 ^ " C=!) y
. "  N  < 4 = ) N " ( < 4
RS.Open SQLs,DB,
..  B .. !!  ^ >'C=  R ' " A  DB , <DO B 
..  N  B=) ;? >' L!  B=' \ 4) < 6 RO = adOpenKeySet,adLockPessimistic
Cursor A? 8  TA' R .. <=  < t

 8 B) 4; 7 A; " ,! ] " 5  S  R( S ) A Cursor 


: <= < t ... 4  A= !

" S! " 5 Cursor = B) R .. "   C 5  y) 8


: B=>;  < 7 A A? 
adOpenKeySe
t
.   <D < 0 /6) \'! 8? \ 4 A0) A? R
5 O=) < 0 bR 4  ! ;  0 /6) A? B=>  : <t!
A? ! A  R =\ D B < 0 ?; ' ")  Cursor 
. adOpenKeySet
adLockPessimistic
;7 <D <)  ~ A? B B=>; 7 8! " A? R!
 8 B ? ! V  A4O; 4!! <0)$ bR A   1 B=>
8!  )  A?' ;? adLockPessimistic A? R  =^ .. 7A=! A!
. 4 
4= 7 ( 1'1 ! =" ) < A  0=< 0)W   7B' .. <0)$ bR5
.. A? = < /!  = 8 ?  ..  N !
Command1 " ) 6 " L; 7 A? ?= < A0 A

: A? R7 V =O ?; 'L! CT Command1 L   N

A? R 4' A
Private Sub Command1_Click()
' A? )?=\ A 
End Sub
RO ' =) Click " C ="  5! ) " 6 " "  L R L 8? A R
8 B ( ) 6 84 <7T> <5! A?' ;? "]7 5B4) ) A0 7 A 
: A? R =\ V

  = 
" " = Text1.Text     Text
A4 :
 t A0 =; '  5BT A .. t 8E 80A ' 4 " " Text1
R   80' = C' /$ E ! 80 ^. Name <D
!! ~ : <tB! A ;7 80 A  ! 80  )?A 1 B ;780
! +
 Text1?  " 8  Name: txtID +
R ) \4= ! E ! 1 ^A?) !  Name <D  80 A .

! :
" " = Text1.Text
) / ; B 8B67 80 " "
;N 8?A   \  A0 =; ;7 A   +)  ;7R =^ !  6
A0 .. A )?A ?A =; :

Private Sub Command1_Click()


Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Text6.Text = " "
End Sub
. " ) 6 " L  ! 5=
" O " A b B ; L  80=
A? R7 VB! =O ?; 'L! CT " CT : A? R7 E ! b =E >!?

; B  L A? ^ ?= < L4 R7  V 5t' A b=E


: <=; < 7 

! : <t "  " O " Command2R ) \4= ! ' < ? , .. A
 4R L4 ^ L :
)(Private Sub Command2_Click
End Sub
;7R L4 =?A ! "= 5=; :

   CL A )=  O .


   CL   7 80 A ' 5t< " ' ? ) 1
7 80 .
 ! '?A   <E DAE  " =! N^ "  " OA
" ) !=O ; ( A ' 5t< " ?' ? ) 1  .
A  =^ != C <  ;7 RS> 4 <7T  C=!  N ")  RS
,E=?  4  4 .

  ?= < ?A \4) = ;7 LR ?A \ " A )=?  ;7   .

A : 1  4 =^   ' 7 80 R5 ?A :


-

A  =^  < B ;? msgbox <  =^  ! )?A 7 80 ..


 ? 8?A ?A =; ..

 t < ,N>  = ;,0  )= ' ) A <   5 ..

: 5 !  A 8,
<))R'
$E
"!AB!
S






: ;= Msgbox 8?5


A B"  b4' + S - "!AB! - <))R' < A" < "  msgbox
" <
MsgBox " Type Your Text Here ",Kind Message(Information,...)+Allignment,
" Title For Message "

: ;=; < ,5  8? A?) ;?

Private Sub Command2_Click()


If Text1 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
End Sub
! 
If Text1 = " " Then
: ;= 8  .. 7 1 N 80 
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
: M    57  =^ $E < 5
Exit Sub
. "B =  0' 1 6> R ! E
End if
If < 6 <)5

A$!   $=    \ A? R  Msgbox   B= B :::


: ;=; ,5  A? A?) ;? ~A 4 ! 6

:
R A?A !

If Text1 = " " Then


MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text2 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text3 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text4 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text5 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text6 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if

 E  =^ ! 6 ! 5=> B 1  0 ! A6A! A 8 8E  N  V= yN )'; : M   A? 8O A? R=\

SQLs = " Select * From Emp where EmpNo = ' " & Text5 & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeySet, adLockPessimistic
If RS.EOF Then
GoTo OkAddNew :
Else
MsgBox " Sorry,The Number Exist Before", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End If
OkAddNew :
:A? ! 
.. T D !

SQLs = " Select * From Emp where EmpNo = ' " & Text5 & " ' "
. V)  5LE " 4 bR 8  A?  C=!
' " & Text5 & " ' < 4)< 5 ;7 1
. 6 " 5! + ' 5 C! B bR
! ' " & & " ' B bR !  Text5  BT   :  )'; S 

A4 :
;7=AN /! 8!B  ) \4 '=A0 0 ^. 5 <D
?; '=B < 6  SQL> <7T =B  R  ) "E =^ !
E '? A y~ "  "  80 V \4) VR= < bR!B ..
? ~ A?' 5 R5 ? .. ! 1 .. 8    \ A  80   N ;7 80
 ! A  ..
' TA+
< 6 ;7>=B 'A0 :
 10
= 6 !   B   OA "  ? 5 "   A  ) N ! +
  )  W  A 7 )?A )  R R ( ..
R A B ;7! 8D "A A N ;7   +! ;7 ..R "  " "A EmpNo

  "  ;7 = < < 6 \4) SQL )?A   ! Text bR!B


'"& &"'
 !  A ! 80 A?7 N =; " & & " A0 R ( ' ' ) <!B
 ! A ! 80 ') A?7 =; .. #" & & "#! 6 D 85
 ?  8 ?A..
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeySet, adLockPessimistic
?A  B  A  )  =7 4 ! E < 6>=B ! E  0
 = 5 ! ;0>' ..A ?A  D! 8 .
If RS.EOF Then
R ?A ..   ) 6?
A )?A !A 5O  =B) " ..?A .Cursor
R  )A0 : 8?A Cursor 8D ( EOF End OF File ) 84 E#
 ); 4
" N   c NR 6 ! < 6>=B  ) 4
' M0 A .. ) 8E 8E>6 A ) R ?A :

:   )'; M0'
GoTo OkAddNew :
A?' 1  <  /T /$ ' . " OkAddNEW : " < ? \  .. ; B) R
. V  A4O; 7 A4!
Else < 6  ;  )  B) A? R ! )  
( < 0   /6 Cursor  ) N R5 OA   6 ; B) .. M0=) 
: ( <  =^ bR 5t ) A? R )   A
MsgBox " Sorry,The Number Exist Before", vbCritical+ vbMsgBoxRight," Error "
! E# A  A6A! N R
'^A ;
Exit Sub
"B =  0' 1 6> ! E
End If
if < 6 <)5
GoTo OkAddNew :
: A? R )   A M0=) !  .. 5   N ;= ; ? < bR
GoTo OkAddNew :
~ N R
\ )= = ! 4) B! 84 <7T 8N : A 8 B  N <0)$ bR5
... OA    N ;7 A6A!
1 "  <  =^ 5t' N R A6A!  84 ) A A6A! ?) 
. <7T>) ?
: A )=? '; =; 1 ;? N  V= ! 5=> B  N ;7 ) 6 84 <7T ) 6 84 <7T < B ;= A?=\
 6 " 5O ;? L6  A?  0 A
 ' '';  =^ < O  C  ! )= 8B4 A 1
" 1 / B O != !  < y 8"
. O )= .. B  ! )^=. 6> )^ ! . 1  ! )^=-

MSGSave = MsgBox " Are You Sure To Save This Information?", vbQuestion+
vbMsgBoxRight+ vbYesNo, " Save "
If MSGSave = vbYes Then
' O 
End If
" 1/ B "  "  < " A='  <  =^ 5t' ;? 8?5 R ##
! 
MSGSave =
. ")  MsgBox O) A MSGSave "  .. C=! R
' =^ V ) ; String A ! C=! )' y V  A4O< C ;7 BW
. (( String A   )) 07 . ; =)7 57B' ] ! C= 
MsgBox  )" O) A C=  R
MSGSave = MsgBox " Are You Sure To Save This Information?", vbQuestion+
vbMsgBoxRight+ vbYesNo, " Save "

.. "7 O )=b A? < bR RE) A MSGSave C= :+ TA'


.. ;   7 C=  /! 07 8!B= ;?
If MSGSave = vbYes Then
( vbYes ) MSGSave C=  )  .. C=   t
vbYes ; B) !
8E  )  M0=) A <; 7 Yes  =^  C) !  " ; B)
" O A A?) A R " A?

End If
If < 6 <)5
: ;= A  N ;7 O ^A? ?= < A0 A -

MSGSave = MsgBox " Are You Sure To Save This Information?", vbQuestion+
vbMsgBoxRight+ vbYesNo, " Save "
If MSGSave = vbYes Then
' O 
RS.AddNew
If Not Text1 = " " Then RS![FirsName] = Text1
If Not Text2 = " " Then RS![FatherName] = Text2
If Not Text3 = " " Then RS![GrandName] = Text3
If Not Text4 = " " Then RS![FamliyName] = Text4
If Not Text5 = " " Then RS![EmpNo] = Text5
If Not Text6 = " " Then RS![Job] = Text6
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Save "
End If
. A? ! 
<   '; 0 !   =^ 5t' ;= '  < 0 .. <A5 ; ])< 7 !
. 4; 7 <7T>
RS.AddNew

;7 ) 6 84    " 4  4 AE V)  R " RS ) y " .. ; B'


. 07  84 =O) ! R " Emp 4
 A?
;= 8  Then ( " 7 y ?= ; B) ) .. ;T7 Text1  )? 
RS![FirsName] = Text1
;7 FirsName 80  Text1  < N ) RS 4  4 C=! ! \$
!! O   '=  < .. Emp 4
Text2 & Text3 & Text4 & Text5 & Text6 ... M   A?~ O A?; N
RS.Update
. O 84  c) = N (( RS )) 4  4 C=  A0 O 
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Save "
" vbInformation <!AB! AD "   =^ 5t' < bR .. 0 ! " ' 
O S )< < 5 /=' !AB! <
( If MSGSave = vbYes Then )< 5 )
 N ;7 ) 6 84 O <0)W  B' <0)$ bR5
" O " ; 7 8!? A? R

If Text1 = " " Then


MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text2 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text3 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text4 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
If Text5 = " " Then
MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
/
5

If Text6 = " " Then


MsgBox " Sorry,Type Name ", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
End if
SQLs = " Select * From Emp where EmpNo = ' " & Text5 & " ' "
RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeySet, adLockPessimistic

RS.EOF Then
GoTo OkAddNew :

MsgBox " Sorry,The Number Exist Before", vbCritical+ vbMsgBoxRight," Error "
Exit Sub
/
5

OkAddNew :
MSGSave = MsgBox " Are You Sure To Save This Information?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Save "
MSGSave = vbYes Then
RS.AddNew

Not Text1 = " " Then RS![FirsName] = Text1


Not Text2 = " " Then RS![FatherName] = Text2
Not Text3 = " " Then RS![GrandName] = Text3
Not Text4 = " " Then RS![FamliyName] = Text4
Not Text5 = " " Then RS![EmpNo] = Text5
Not Text6 = " " Then RS![Job] = Text6
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Save "

/
5

::: /6 < =  ' "6A " E "

 CT " E " L! CT ?; 'O= R7 V ?A =; :

! " 5?A R A ?=" A^ !  A ; ..=\ R A


Unload Me
; B) A ! ; ' ;CR ..

bR5 <0)$= !  5  A ;7  ! ;7 8D= !  5  " !!


  V
 ;N  A )=? 57?A A )?A ?A !A5O ' V 85< B
) "6=0A  ( 8 R b B%% frmChangePass A
A' %%

L! CT " CT ?; ) V =O A

R  A !: "= 5
' C? <  )< <  =^  AE  =^  R  A )8  " \4
=; :
 = <  <   < ) 0
 = <  <    ) 4
 '  <    ) 4 ..
A A0 ! <4 A bR50)$<
? <  )< . <D < ) 0
A0) 1 =
  ' C? <  )< -
 <    ) 4 != <0 $  <    ) 4 .
 =
 ' ) c  O <    ) 4 6 ;7  . USERS
 CT A L! CT ?; 'O= !R7 VB ?A ..
A ?=\ A ;7AO A )(Form_Load
8B4 1 RE) Text1  =^   8E!. :

 = ;0>' !  ). 8

A AO; 7 A? R=\


Private Sub Form_Load()
Label1.Caption = UserNames
PoolConnection
End Sub
! 
Label1.Caption = UserNames
< N RE) A C=  R UserNames C=  < N RE) "B4 Label1 B
C=  R  B=' A AE  ^A ; 7 ) .. :!  8E =^ 
. (  8?
PoolConnection
1'>; >' ! < 0 ) =0 ! " ' 
L! CT Command1 " O"  CT =  R7  /6
: A? R ?= < N

<0 $=! ]]< 7 A0  =^   ' 6 1


: <t!
< ) 0  <   A Text2
) 4  <   A Text3
) 4 '  <   A Text4
If Text2 = " " Then
MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Text2.SetFocus
Exit Sub
End If
If Text3 = " " Then
MsgBox " Please Type New Password ", vbCritical+ vbMsgBoxRight, " Error "
Text3.SetFocus
Exit Sub
End If
If Text4 = " " Then
MsgBox " Please Type ReNew Password ", vbCritical+ vbMsgBoxRight, " Error "
Text4.SetFocus
Exit Sub
End If
If Text3 <> Text4 Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+
vbMsgBoxRight, " Error "
Exit Sub
End If
.. ! 
: ; ) 6 <  6A' ? )   6 ~ M   A?
SetFocus
+!  L =8B6 : ; B' ;
80; 7 < =? S! 8B6 " Text2.SetFocus " 
( Text2 ) ;+
<]7 A0  = ^   ' 6 B 1 < D < ) 0  <   8 V ';  =: ;= A?=\

SQLs = "Select * FROM Users Where UserName = ' " & UserNames & " ' and
Password = ' " & Text2 & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
If RS.EOF Then
MsgBox " Sorry,The Old Password Wrong ! ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub
Else
GoTo OKs :
End If
OKs :

! 
SQLs = "Select * FROM Users Where UserName = ' " & UserNames & " ' and
Password = ' " & Text2 & " ' "
:  ' A?  < 6
 8 ) R C=   =^ !    =^ )  ) 6 ! ; B=
( 2 80 ( )  <   '  t  8E = ^ 
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
( " 4 8C= N ) =E .. 8N ! 5 '
If RS.EOF Then
MsgBox " Sorry,The Old Password Wrong ! ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub
< ) 0  <   AO " <  =^ 5 b 4)  84 E#  S 8D
. b B R A? < 6' < ?= 0' 1 6> ! E . " <WE

Else
GoTo OKs :
End If
OKs :
(   = ^ 8BO A6A!   )  < .. V]
OKs \
If )< 5
OKs
: ;= A? < 6' / =) ;?   8)
M0= B c) '   <     =^ )'; V =B
. 8BO )A6A!    < 1

MSGSave = MsgBox " Are You Sure To Change This Password?", vbQuestion+
vbMsgBoxRight+ vbYesNo, " Change Password "
If MSGSave = vbYes Then
' Update Password

SQLs = "Update[Users]Set[Password]=' " & Text4 & " ' Where [UserName]=' " &
UserName & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
MsgBox " The Old Password Has Been Changed ! ", vbCritical+ vbMsgBoxRight," Save "
End If
: ! 
A? < 6 1 )  6 A 6A) 1
SQLs = "Update[Users]Set[Password]=' " & Text4 & " ' Where [UserName]=' " &
UserName & " ' "
..  '
  4 80" )  B6 A A   ! ^=  6 c) = N
" " O=  UserName C=  < N "  =^ ) 

Update < 6 \ '1


Update[Users]Set[Password]
( c) = ) Update < 6 \=?' y A [ ] AN A6A B=> < 6  =^'
. " =bR A?' 1 ! $E V$B) A AN bR
0 ! " ' 0 " =)  A?; N
Command2 " E " L  CT  < =  /6 :::
A? R /T

.. R ! 8 = C A Unload Me


" frmChangePass " A  8! A? A R :::

Private Sub Command1_Click()


If Text2 = "" Then
MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Text2.SetFocus
Exit Sub
End If
If Text3 = "" Then
MsgBox " Please Type New Password ", vbCritical+ vbMsgBoxRight, " Error "
Text3.SetFocus
Exit Sub
End If
If Text4 = "" Then
MsgBox " Please Type ReNew Password ", vbCritical+ vbMsgBoxRight, " Error "
Text4.SetFocus
Exit Sub
End If
If Text3 <> Text4 Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+ vbMsgBoxRight, "
Error "
Exit Sub
End If
SQLs = "Select * FROM Users Where UserName = ' " & UserNames & " ' and Password = ' " & Text2 & " '
"
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
If RS.EOF Then
MsgBox " Sorry,The Old Password Wrong ! ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub
Else
GoTo OKs :
End If
OKs :
MSGSave = MsgBox " Are You Sure To Change This Password?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Change Password "
If MSGSave = vbYes Then
' Update Password
SQLs = "Update[Users]Set[Password]=' " & Text4 & " ' Where [UserName]=' " & UserName & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
MsgBox " The Old Password Has Been Changed ! ", vbCritical+ vbMsgBoxRight," Save "
End If

End Sub

Private Sub Command2_Click()


Unload Me
End Sub
'-------------------------------------Private Sub Form_Load()
Label1.Caption = UserNames
PoolConnection
End Sub
;  <    =^ C= A0) :!    <0)$ bR5
: <= A$^  80 ?;  =Save O< A0) E !  O^^
" frmCheckUser " "  R A \ 

: ;= A  5t) ;? L! CT " CT

\ $) A  R 5t)  !:! 8C' =) !  A  R < 5! . ( Administrator ) t ! )


: ;= 8 B A
. 8)' !  1; 0= 
. USERS 4= O
. Login AE  A  A E# A  5" ! =^ )= 7 4 
.  E\   =^ 4) O; 7
. / 6   =^ $ 4; 7 O =)







A? R7 V =O ?; 'L! CT A   C N


Form_Load 8 =;  7 A AO; 7 A? R ?= < N
Private Sub Form_Load()
PoolConnection
SQLs = " Select * From Users "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' ! ^= ! 6A) " ; B) R< -- OD 4   )? 
If Not RS.RecordCount = 0 Then
frmLogin.show
Unload me
End if
End Sub

07 ) 4 A )=  A A?


If Not RS.RecordCount = 0 Then
: ;= 8  OD = Cursor  5 /6 R 4   )? 
Cursor  5 ! ;= 4     6 A0' RecordCount <  BW
frmLogin.show
" frmLogin " A    5
Unload Me
" R ; ! C ; " OE

: B  7 " ;' A frmLogin A  8? A R 07 B

L! CT " O "  CT frmCheckUser A  /6

L 8E A? R=\
VR]< 7 A0  =^ !  ' 4 A 1
  '  < /!    < M $' \4)
: <t!
  =^ - Text1
 "  - Text2
'  "  - Text3
If Text1 = " " Then
MsgBox " Sorry, You Must Type Username ", vbCritical+ vbMsgBoxRight, "
Error "
Text1.SetFocus
Exit Sub
End If
If Text2 = " " Then
MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Text2.SetFocus
Exit Sub
End If
If Text2.text <> Text3.text Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+
vbMsgBoxRight, " Error "
Exit Sub
End If

07 ) 4 ! 
If Text2.Text <> Text3.Text Then
) 1 ; B' <> "!B
1 \ B : 57 O < 5t    = ^ 6 B :::
O =) A B =E B
UserNames C=! ;7 )   =^ L^' =)  UserPassword C=! ;7 5 )L^' =)  <  MDIForm1 ; , A  5 )= V B  A? R=\

SaveMsg = MsgBox " Are You Sure To Create Administrator ?", vbQuestion+ vbMsgBoxRight+ vbYesNo,
" Save Data "
SaveMsg = vbYes Then

RS.AddNew
RS![UserName]=Text1
RS![Password]=Text2
RS![GAdd] = True
RS![GEdit] = True
RS![GPrint] = True
RS![GCreateUser] = True
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "
' Save This Informations
UserNames = Text1
UserPassword = Text2
' Long Main
Set RS = Nothing
Set DB = Nothing
MDIForm1.Show
Unload me
/
5

07 ) 4 A   A?
RS![GAdd] = True
R Yes/No 80 A   0; '  7 ' A True < N GAdd 80 
True / False ; B)
... "O R 80 VR 80 < 0 )=   A
RS![GAdd] = True
RS![GEdit] = True
RS![GPrint] = True
RS![GCreateUser] = True
80 True < N   
 t  AE ; 7 ! ^=   4! ;7  =^ A : A4
. ! ^=   - <$ - 8) B= - <7T> - ;
: M   8  \4) <D^ bR; 7 ?=' ;?
Set RS = Nothing
Set DB = Nothing
 >'C=! VR ; 1 "= N 4  4  ^C=  8B6
; 1 ; B) !
"= N A?' B=> < 0 O )=4  4 C=!
7 6  B= ! )=
< 4 bR ?'< A0' C= ; 7! O  ! ') ' R Null y 
Nothing = C=  Set
MDIForm1.Show
Unload me
( R" ! ,C ; ) A ; OE ; , A  5
&&  =  < /6&&
L! CT " CT " E " L

A? R=\
Unload me

" t ) ! " A  8! A? A R


Private Sub Command1_Click()
Text1 = "" Then
MsgBox " Sorry, You Must Type Username ", vbCritical+ vbMsgBoxRight, " Error "
Text1.SetFocus
Exit Sub

/
5

Text2 = "" Then


MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Text2.SetFocus
Exit Sub

/
5

Text2.text <> Text3.text Then


MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SaveMsg = MsgBox " Are You Sure To Create Administrator ?", vbQuestion+ vbMsgBoxRight+ vbYesNo,
" Save Data "
SaveMsg = vbYes Then

RS.AddNew
RS![UserName]=Text1
RS![Password]=Text2
RS![GAdd] = True
RS![GEdit] = True
RS![GPrint] = True
RS![GCreateUser] = True
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "
' Save This Informations
UserNames = Text1
UserPassword = Text2
' Long Main
Set RS = Nothing
Set DB = Nothing
MDIForm1.Show
Unload me
/
5

Private Sub Command2_Click()


Unload me
End sub
Private Sub Form_Load()
PoolConnection
SQLs = " Select * From Users "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' ! ^= ! 6A) " ; B) R< -- OD 4   )? 
If Not RS.RecordCount = 0 Then
frmLogin.show
Unload me
End if
End Sub
") R A  80 ?;  =Save O< A0) E !  O :::
" frmCreateUsers " "  R A \ 

 =; < 7 V 5t) ;? A    L! CT CT

 ;7 8 BR  A =; "  A   =^ ! !  " :


-

=0  A ! < 1'1 .


6 =7  =^ ! .
6  =^ ! E   ' 7 80 .
 <   != <0 $  <   .
= !
  =^ ; ~ !A6A ;7 0  !A6A A
=  V
R A6A! 1 N ;7  .
' " 5t<
 O ;7 0 /! .. .

 CT A L! CT =\ R ?A  ;7 =  8 Form_Load

PoolConnection

: A? R =\ Command1 " O " L  < =   /6


Text1 = "" Then
MsgBox " Sorry, You Must Type Username ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

Text2 = "" Then


MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SQLs = "Select * FROM Users Where UserName = ' " & Text1 & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS.EOF Then
GoTo SaveOK:

Else
MsgBox " Sorry,The Username Is Exist Befor ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

End If
SaveOK:
Text2.Text <> Text3.Text Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SaveMsg = MsgBox " Are You Sure To Save This Informations ?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Save Data "
SaveMsg = vbYes Then

RS.AddNew
RS![UserName]=Text1
RS![Password]=Text2
' <7T>< D
If Check1.Value = True Then
RS![GAdd] = True

Else
RS![GAdd] = False

End If
' 8) B=< D
If Check2.Value = True Then
RS![GEdit] = True

Else
RS![GEdit] = False

End If

' ! ^= <  D


If Check3.Value = True Then
RS![GCreateUser] = True

Else
RS![GCreateUser] = False

End If
' <$< D
If Check4.Value = True Then
RS![GPrint] = True

Else
RS![GPrint] = False

End If
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "

End If
) 4 A1 07 .. A?
If Check1.Value = True Then
RS![GAdd] = True
Else
RS![GAdd] = False
End If
; B) R
b !^=Check1 8

Then ;= 8  ( b ) !^=B y


RS![GAdd] = True
" True " < 0< " 7T>< D " 80 
Else
( b !^=y  ) V]
RS![GAdd] = False
" False " < 0< " 7T>< D " 80 

%% /6 < =  %%


 ? -- Check3 ,  =^ !

 CT?L! CT , ?; 'R7 V =O ?A :

: ;= Click ;  7 A? R ?= < N

If Check3.Value = True Then


Check1.Value = True
Check2.Value = True
Check4.Value = True
Check3.Value = True
Else
Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False
End If
..A?
R ; B) !
/ 6 V)  A?' \ 4) " ! ^= < "  D ! ; ! =^ $B ! ') '
;BW /N R

 ) A?
If Check3.Value = True Then
: ;= 8  ( b=E "   =^ ! " !^= ) ! ' ,? 
Check1.Value = True
Check2.Value = True
Check4.Value = True
Check3.Value = True
" b  =< " !^=,? N 8B6
Esle
( ) " ~ !^=V]
Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False
b  =< ] !^=,? N 8B6
: "E A? R " =\ E "  < =   /6 ::
Unload Me
: ;= ) " 6 " "= = N A  R; 7 ) 6 T :::

: " ) 6 " 8E A? R T

Text1 = " "


Text2 = " "
Text3 = " "
Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False
" ; " ] !^=1 < N ,?; $ VR A0 / 6 ; 7 ; B) R
: ( ! ^=  )  A  8!? A? A R

Private Sub Check3_Click()


If Check3.Value = True Then
Check1.Value = True
Check2.Value = True
Check4.Value = True
Check3.Value = True
Else
Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False
End If
End Sub
Private Sub Command1_Click()
Text1 = "" Then
MsgBox " Sorry, You Must Type Username ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

Text2 = "" Then


MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SQLs = "Select * FROM Users Where UserName = ' " & Text1 & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS.EOF Then
GoTo SaveOK:

Else
MsgBox " Sorry,The Username Is Exist Befor ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

End If
SaveOK:
Text2.Text <> Text3.Text Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SaveMsg = MsgBox " Are You Sure To Save This Informations ?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Save Data "
SaveMsg = vbYes Then

RS.AddNew
RS![UserName]=Text1
RS![Password]=Text2

' <7T>< D

If Check1.Value = True Then


RS![GAdd] = True

Else
RS![GAdd] = False

End If
' 8) B=< D

If Check2.Value = True Then


RS![GEdit] = True

Else
RS![GEdit] = False

End If
' ! ^= <  D

If Check3.Value = True Then


RS![GCreateUser] = True

Else
RS![GCreateUser] = False

End If
' <$< D

If Check4.Value = True Then


RS![GPrint] = True

Else
RS![GPrint] = False

End If
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "

End If
End Sub
Private Sub Command2_Click()
Unload Me

End Sub
Private Sub Command3_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False

End Sub

Private Sub Form_Load()


PoolConnection
End Sub
;= A "  6A= ;? Save O< A0) E !  O :::
" frmEditEmp " "  R A \ 

 =; < 7 V 5t) ;? A    L! CT CT

 A  ;7 8 B " ' 8) B  " OA=; :


-

=0  A ! < >'1


6 =7  OA
6  =^ ! E   ' 7 80
 N  =A6A! ~ " 8) B  ^ 
=  V
R A6A! N N ;7 
!A6A A ' " 5t<
' 8) B ;7 0 ..
A  =^  Rss = C^  4  4 R '?   " ;7 )<
 A A )  =B A EA  A < 6 ;0= ) ;?.. c
 A  ! SQLs  8) B= c frmSearchEditEmp OA

'A TA :
-1R ) ; B A ^  frmSearchEditEmp cR A )  $BB! N
?; )=  A  ;7 " <4B " ' 8) B " OA
-2 < 6 bR ?A A  ;7 .. A c )=  \   5, B! N  !. B
 SQLs C=! 8N !  NL^! < + A )^L 8 6 "7 ?A  A )= '^)L
< 6 ?A   =B  .. B! N
 +! ;7R < 6 ?A =; :
" ' SQLs = " Select * FROM Emp Where EmpNum = ' 20
< 6 ?A ! Public 5 "7B ) !" ( 8  ) =AB$ ADA 5
>=O !  ^L ;7.. 5E
=) -3>=B ! E >'  0 .

Data Grid ; 7 5BT\  6 =) -4


=) A " C  . <? "  CD ' " A Data Gird ; 7 -5
8) B' " A   80 ) =A L  C "  OA  8) B' " A  ! 
.. R; 7 <AO! A?  < 6 " OA 
.. 57 ;1 " <T7 " A?' A " OA  8) B' " A ; 7 A?  < 6 -6
. 1'>< ! < ,0= )= A R; 7 " OA  8) B' " A  8 '  -7
: ; .. R; 7 "L^  A?  < 6 <$A 4= 7
SQLs = " Select * FROM Emp Where EmpNum = ' 20 ' "
RS , Rss )C=! )B' ,7! + cursor '= ! < A 
" OA  8) B' " A   -8
..  4! 8 ?  .. AT + yD? O 8 =;  7 A? R =\ L! CT frmAddEmp A   CT
Form_Load
B "7 ? " frmAddEmp " A  A " O A "=? A R A? : <t!
7=E>
Dim EmpNo As String
Sub FillData()
On Error Resume Next
If Not IsNull(RS![FirsName]) Then Text1 = RS![FirsName]
If Not IsNull(RS![FatherName]) Then Text2 = RS![FatherName]
If Not IsNull(RS![GrandName]) Then Text3 = RS![GrandName]
If Not IsNull(RS![FamliyName]) Then Text4 = RS![FamliyName]
If Not IsNull(RS![EmpNo]) Then Text5 = RS![EmpNo]
' y ?= < =; ! 0 LE C=!) y

EmpNo = Text5
If Not IsNull(RS![Job]) Then Text6 = RS![Job]
End Sub

Private Sub Command1_Click()


Text1 = "" Then
MsgBox " Please You Must Type Name ", vbCritical+ vbMsgBoxRight, " Error Name "
Exit Sub

/
5

Text2 = "" Then


MsgBox " Please Type Father Name ", vbCritical+ vbMsgBoxRight, " Error Father Name "
Exit Sub

/
5

Text3 = "" Then


MsgBox " Please You Must Type Grandfather Name ", vbCritical+ vbMsgBoxRight, " Error Grandfather
Name "
Exit Sub

/
5

Text4 = "" Then


MsgBox " Please Type Family Name ", vbCritical+ vbMsgBoxRight, " Error Family Name "
Exit Sub

/
5

Text5 = "" Then


MsgBox " Please You Must Type Employee Number ", vbCritical+ vbMsgBoxRight, " Error Employee
Number "
Exit Sub

/
5

Text6 = "" Then


MsgBox " Please Type Job ", vbCritical+ vbMsgBoxRight, " Error Job "
Exit Sub

/
5

EmpNo = Text5 Then


:
GoTo

/
5

' ----- Here We Use Rss Variable ----SQLs = "Select * From Emp Where EmpNo = ' " & Text5 & " ' "

If Rss.State = adStateOpen Then Rss.Close


Rss.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If Rss.EOF Then
GoTo

/


Else
MsgBox " Sorry,The Employee Number Is Exist Befor ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

End If

OkAddNEW :
' -----------------------------------Dont_Check :
SaveMsg = MsgBox " Are You Sure To Save This Informations ?", vbQuestion+
vbMsgBoxRight+ vbYesNo, " Save Data "
If SaveMsg = vbYes Then
RS.AddNew
If Not Text1 = " " Then RS![FirsName] = Text1
If Not Text2 = " " Then RS![FatherName] = Text2
If Not Text3 = " " Then RS![GrandName] = Text3
If Not Text4 = " " Then RS![FamliyName] = Text4
If Not Text5 = " " Then RS![EmpNo] = Text5
If Not Text6 = " " Then RS![Job] = Text6
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
PoolConnection
' SQLs = " It is Coming From From Search "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' Go To This Sub
FillData
End Sub

.. A? ! 
General ; =)7 A? R7 ; 7 C=! )B=  N 1

Dim EmpNo As String
 C=  R 
: A4
)=?1 A  N " 0 !     A  N O=> A0) A C=  R
O=) ;? C=  R  7 .. =O  R  <t7 \ 4) . ;= O! A
1 !  .. ; ~ " R B=>  C O^= A0 A .. A  N
R ! ~ A!  c A0) ~ " ; 8) B= A  ;7 A  N C'
 D
; ~  bC' =)   C=! ]( A  N ) 80 A?) !  .. 
' N !  .. <D^ bR  $  /$= ' <0)$ bR5 .. V= c
A6A! B .. 1  OA   A6A! N R 8 .. "B! "0  )= bC'
.. O '=  < A A6A! ?)  ! A6A! A 
.. < 5t' A
Sub FillData()
On Error Resume Next
If Not IsNull(RS![FirsName]) Then Text1 = RS![FirsName]
If Not IsNull(RS![FatherName]) Then Text2 = RS![FatherName]
If Not IsNull(RS![GrandName]) Then Text3 = RS![GrandName]
If Not IsNull(RS![FamliyName]) Then Text4 = RS![FamliyName]
If Not IsNull(RS![EmpNo]) Then Text5 = RS![EmpNo]
' y ?= < =; ! 0 LE C=!) y
EmpNo = Text5
If Not IsNull(RS![Job]) Then Text6 = RS![Job]
End Sub
" FillData " "  A? O=) L6  
<OA L4 R   B  7 B' ;? "!A5O! A?' = <  07 .. 5' 1 " =
... A?
L4 R ,7!  
from_load A AO; 7 A  E ! "' )= ! L4 R
( .. A0; 7 5T 4  ! RE ) .. 4 ! A0 B' A '" ,7
On Error Resume Next
 = $E  .. ; B'

If Not IsNull(RS![FirsName]) Then Text1 = RS![FirsName]


+ A? 8O 
If Not IsNull(RS![FirsName])
" .. Not Null ; B) FirsName 4; 7 R 80 " 7 80 ;  )? B) R
: 80 8B6
Then Text1 = RS![FirsName]
FirsName A B < N = ) Text1 80 8B6 ..
.. 80; 7 "TB! A?' Text1 80; 7 B= A0) ;?
" 80 "  C= 07 <0  < 0)$~ O 57 ;N!
EmpNo = Text5
A  N O=> A0) C=  R EmpNo 0 ! C=   
B=> 80= "   A?' ;?
.. ) 4  07 .. 5 =)  A ]\ : <t!
) 6 < 7T A  ;7 R " O A  8) B= A? ( 8) B=; 7 )
.. B C' ' 07
" <  R =) " 8) B' ; 7
RS.AddNew
. c) ' ( update ) 8) B= 07  O ) 6 84 <5= A0' bR  <

: 8) B' A; 7 1
If EmpNo = Text5 Then
GoTo Dont_Check :
End If
.. A  N O=) R C=   =^ ! 
Text5 80 )  EmpNo C=  8 : ;') S  
GoTo Dont_Check :

 \ B 

;= O   V= B=> < 6  LO0 A0) .. 8 R

Private Sub Form_Load()


PoolConnection
' SQLs = " It is Coming From Form Search "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' Go To This Sub
FillData
End Sub
Form_Load A  ;7
A? < 6 1
' SQLs = " It is Coming From Form Search "
( MB' < 6 ) 54' =) A < 4 ) ' ( 5N
 1
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
;= .. R; 7 "L^  SQLs < 6 E ! B=> .. 4= 7 =) A 
c A  ! y'

' Go To This Sub


FillData
 B' =) "E ! "   " N 0 ! .. b = R ) 4 L4 R
.. 1 !  B= M   A?" 7 /T Sub B! L6 8  !L ~ : <t!
<4!; 7 M = ? !  ='\ 5) 1 ! R . A AO; 7 "BT >!?
" OA  8) B' " A  ;,5  A? R
Dim EmpNo As String
Sub FillData()
On Error Resume Next
If Not IsNull(RS![FirsName]) Then Text1 = RS![FirsName]
If Not IsNull(RS![FatherName]) Then Text2 = RS![FatherName]
If Not IsNull(RS![GrandName]) Then Text3 = RS![GrandName]
If Not IsNull(RS![FamliyName]) Then Text4 = RS![FamliyName]
If Not IsNull(RS![EmpNo]) Then Text5 = RS![EmpNo]
' y ?= < =; ! 0 LE C=!) y
EmpNo = Text5
If Not IsNull(RS![Job]) Then Text6 = RS![Job]
End Sub


;


Text1 = "" Then


MsgBox " Please You Must Type Name ", vbCritical+ vbMsgBoxRight, " Error Name "
Exit Sub

/
5

Text2 = "" Then


MsgBox " Please Type Father Name ", vbCritical+ vbMsgBoxRight, " Error Father Name "
Exit Sub

/
5

Text3 = "" Then


MsgBox " Please You Must Type Grandfather Name ", vbCritical+ vbMsgBoxRight, " Error Grandfather
Name "
Exit Sub

/
5

Text4 = "" Then


MsgBox " Please Type Family Name ", vbCritical+ vbMsgBoxRight, " Error Family Name "
Exit Sub

/
5

Text5 = "" Then


MsgBox " Please You Must Type Employee Number ", vbCritical+ vbMsgBoxRight, " Error Employee
Number "
Exit Sub

/
5

Text6 = "" Then


MsgBox " Please Type Job ", vbCritical+ vbMsgBoxRight, " Error Job "
Exit Sub

/
5

EmpNo = Text5 Then


GoTo
:

/
5

' ----- Here We Use Rss Variable ----SQLs = "Select * From Emp Where EmpNo = ' " & Text5 & " ' "
If Rss.State = adStateOpen Then Rss.Close
Rss.Open SQLs, DB, adOpenKeyset, adLockPessimistic
If Rss.EOF Then
GoTo OkAddNEW :
Else
MsgBox " Sorry,The Employee Number Is Exist Befor ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub
End If
OkAddNEW :
' -----------------------------------Dont_Check :
SaveMsg = MsgBox " Are You Sure To Save This Informations ?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Save Data "
If SaveMsg = vbYes Then
RS.AddNew
If Not Text1 = "" Then RS![FirsName] = Text1
If Not Text2 = "" Then RS![FatherName] = Text2
If Not Text3 = "" Then RS![GrandName] = Text3
If Not Text4 = "" Then RS![FamliyName] = Text4
If Not Text5 = "" Then RS![EmpNo] = Text5
If Not Text6 = "" Then RS![Job] = Text6
RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()


PoolConnection
' SQLs = " It is Coming From Form Search "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' Go To This Sub
FillData
End Sub

") R A  80 ?;  =Save O< A0) E !  O :::


" frmEditUsers " "  R A \ 

 =; < 7 V 5t) ;? A    L! CT CT

 ;7 8 BR  A "  A ' 8) B =^ ! !  " =; :


=0  A ! < >'1 . 6 =7  =^ ! . 6  =^ ! E   ' 7 80 .   =^ ; ~ !A6A ;7 0  !A6A A
=  V ' " 5t<
R A6A! 1 N ;7  .
 O ;7 0 /! .. . < =? NR ?A R7 ;7 ' 8) B =^ ! ..

Dim UserNa As String




()

On Error Resume Next


If Not IsNull(RS![UserName]) Then Text1 = RS![UserName]
UserNa = Text1
If Not IsNull(RS![Password]) Then Text2 = RS![Password]
' <7T>< D
If RS![GAdd] = True Then
Check1.Value = True
Else
Check1.Value = False
End If
' 8) B=< D
If RS![GEdit] = True Then
Check2.Value = True
Else
Check2.Value = False
End If
' ! ^= <  D
If RS![GCreateUser] = True Then
Check3.Value = True
Else
Check3.Value = False
End If
' <$< D
If RS![GPrint] = True Then
Check4.Value = True
Else
Check4.Value = True
End If
/
5

;


Check3.Value = True Then


Check1.Value = True
Check2.Value = True
Check4.Value = True
Check3.Value = True

Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False
/
5

/
5

Private Sub Command1_Click()


Text1 = "" Then
MsgBox " Sorry, You Must Type Username ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

Text2 = "" Then


MsgBox " Sorry, You Must Type Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

UserNa = Text1 Then


GoTo Dont_Check:

/
5

SQLs = "Select * From Users Where UserName = ' " & Text1 & " ' "
Rss.State = adStateOpen Then Rss.Close
Rss.Open SQLs, DB, adOpenKeyset, adLockPessimistic

Rss.EOF Then

GoTo SaveOK :
/

MsgBox " Sorry,The Username Is Exist Befor ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub
/
5

SaveOK :
Dont_Check:
SaveMsg = MsgBox " Are You Sure To Update This Informations ?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Update Data "
SaveMsg = vbYes Then
' RS.AddNew
RS![UserName] = Text1
RS![Password] = Text2

' <7T>< D
Check1.Value = True Then
RS![GAdd] = True

RS![GAdd] = False
/
5

' 8) B=< D
Check2.Value = True Then
RS![GEdit] = True

RS![GEdit] = False
/
5

' ! ^= <  D


Check3.Value = True Then
RS![GCreateUser] = True


RS![GCreateUser] = False
/
5

' <$< D
Check4.Value = True Then
RS![GPrint] = True


RS![GPrint] = False
/
5

RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "
/
5

;


Unload Me
/
5

;


On Error Resume Next


RS.MoveLast
FillData
/
5

;


;


On Error Resume Next


RS.MoveNext
If RS.EOF Then
RS.MoveLast
Beep
End If
FillData
/
5

;


;


On Error Resume Next


RS.MovePrevious
If RS.BOF Then
RS.MoveFirst
Beep
End If
FillData
/
5

;


On Error Resume Next


RS.MoveFirst
FillData
/
5




PoolConnection
SQLs = "Select * FROM Users"
RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

FillData
/
5

: A?
: A;  )< 7 C=!  7 
Dim UserNa As String
<  80= 8 < " 4B    = ^ ?; '= O=> C=  R ,7
.. 5 ; 1 ; B=>
R ,7 4  4 ,E RE E A 0 ! "   '  Rss  C=!
: ;= A C= 
A?) !  A$  84  =  A0) cursor A? B=> A0 ! 
) C=! \   =^ 4) Rss   '?  !?< 8) B' "7 A   ) 
.. D 8? ) cursor   < $  ( ?; )= RS,Rss )
" ali " 1 O  " 8) B= B!  ^ ?= < A0) ! B7
+  8  sql < 6 A?=7 " Sys "  bC=   =^ N
Select * From Emp Where Ename = ' Sys ';
cursor S    /6) A < bR; 7 0; 7 A6A! ] Sys  " 1
.. 5'= !?<  B' bR .. OD < 0
07 8) B=< DE "7 6A) A   OA  8) B' A  ;7 <?  bR 8
RS,Rss )C=! /T\ 4)
Sub FillData()
 0 ! A0 B' ? ) sub L4 R E ! FillData  ) 6 L6 
Text ; 7  5t' ;? 80

07 ) 4 A )=  A : <t!


" 84  "
On Error Resume Next
RS.MoveFirst
FillData
..  = $E 
;= 84   cursor    4  4 C=!
FillData A ( ; A0   B ^L4 8' ) ..  
" M   84  "
On Error Resume Next
RS.MovePrevious
..  = $E 
M   84   cursor   4  4 C=!
If RS.EOF Then
84  S  Cursor  
RS.MoveFirst
84   cursor   4  4 C=!
Beep
" \ " AD D
End If
FillData
A0   B ^L4 8' ..  
" ;= 84  "
On Error Resume Next
RS.MoveNext
;= 84   cursor   4  4 C=!

If RS.EOF Then
: ;= 8  ....... 84 E# Cursor  
RS.MoveLast
84 E# Cursor 8B6
Beep
" \ " AD D
End If
FillData
A0   B ^L4 8' ..  
" E 84  "
On Error Resume Next
RS.MoveLast
E 84   cursor   4  4 C=!
FillData

") R A  80 ?;  =Save O< A0) E !  O :::


" frmLogin " "  R A \ 

 =; < 7 V 5t) ;? A    L! CT CT

: ;= " t   AE  84 ' A  " A  R; 7 8 B 


. 1'> ! < A  0= . ! ^=  6 =7 . 7 80   ' E  =^ ! 6 A A6A! ~   0; 7 A6A! ;    =^ V= .  N ;7 A6A! ] 1 R " < 5t'
. C= ; 7   = ^  <  O : AE  84 ' R7 ;7 A? R ?= < N


;


Text1 = "" Or Text2 = "" Then


MsgBox " Sorry,You Must Type The Username And Password ", vbCritical+ vbMsgBoxRight, " Error
Login "
Exit Sub


/
5

SQLs = "Select * From User Where UserName = ' " & Text1 & " ' And Password = ' " & Text2 & " ' "
RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

RS.EOF Then
MsgBox " Sorry, The Username And Password Is Wrong ! ", vbCritical+ vbMsgBoxRight, " Error Login "

'

Save This Inforamtion


UserNames = Text1
UserPassword = Text2
Long Main
Set RS = Nothing
Set DB = Nothing
MDIForm1.Show
Unload Me

'

/
5

/
5

;


Unload Me
/
5




PoolConnection
/
5




KeyAscii = 13 Then
Text2.SetFocus

/
5




KeyAscii = 13 Then
Command1_Click

/
5

: A 
Text1 = "" Or Text2 = "" Then
MsgBox " Sorry,You Must Type The Username And Password ", vbCritical+ vbMsgBoxRight, " Error
Login "
Exit Sub


/
5

M0' ! ; = <W If < 6


" ; " B' ; Or <  =^ !  
Msgbox <   5 7 ;+  80 A?) ! 
SQLs = "Select * From User Where UserName = ' " & Text1 & " ' And Password = ' " & Text2 & " ' "

:  ' A?  < 6


80  =^ !    =^ )  6 !   B=
;+ 80  <   ' 


RS.EOF Then
MsgBox " Sorry, The Username And Password Is Wrong ! ", vbCritical+ vbMsgBoxRight, " Error Login "

b 4)  84 E#  Cursor S  8D 8


$E    <  =^  <  5
/

V]

'

Save This Inforamtion


UserNames = Text1

1 80; 7 A6A     O  A C=!


UserPassword = Text2

2 80; 7 A6A     O A A C=!


'

Long Main
Set RS = Nothing

.. b] B=> ( !   7 ) " < N 1 4  4 C=! 8B6


Set DB = Nothing

;AC! ] ( 7 )  0  >'C=! 8B6


MDIForm1.Show

.. ; , A    5
Unload Me

" AE  84 ' " A  ; A ; OE







KeyAscii = 13 Then
Command1_Click

/
5

A?  C  A RO ' =) R KeyPress  


..( B! N " A?; 7 =O! 8' ) O  N bR KeyAscii 
. KeyAscii ; 7 13 " N Enter => 8+!
! R


KeyAscii = 13 Then

;= 8   =^  >= ( CT )  )


V L  8'
Command1_Click

Text2.SetFocus 8+! ( 80 E# y ?'  L ) =8+! E# 8 B A0) ) ?


L 80 = <0)$ bR  " ' =^ /TA A0' 80 2 N 80  L =8B4)
.. A0>= 
: AE  84 ' A  ;,5  8!? A? A R

;


Text1 = "" Or Text2 = "" Then


MsgBox " Sorry,You Must Type The Username And Password ", vbCritical+ vbMsgBoxRight, " Error
Login "
Exit Sub


/
5

SQLs = "Select * From User Where UserName = ' " & Text1 & " ' And Password = ' " & Text2 & " ' "
RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

RS.EOF Then
MsgBox " Sorry, The Username And Password Is Wrong ! ", vbCritical+ vbMsgBoxRight, " Error Login "

' Save This Inforamtion


UserNames = Text1
UserPassword = Text2
' Long Main
Set RS = Nothing
Set DB = Nothing
MDIForm1.Show
Unload Me
/
5

/
5

;


Unload Me
/
5




PoolConnection
/
5




KeyAscii = 13 Then
Text2.SetFocus

/
5




KeyAscii = 13 Then
Command1_Click

/
5

") R A  80 ?;  =Save O< A0) E !  O :::


" frmPrintReport " "  R A \ 

 =; < 7 V 5t) ;? A    L! CT CT

 ;7 8 BR  A " " A! / OA! <W=; :


=0 >' 0  )  <DE . ( ADODC 6 =7  . EMP OA =B ! 6  1 OA! 8 N  ;7 <OA =. C 5  <? ;7B . DataGrid  ! ) )0' <W = ( DREmp )0R . 0 ! b D 5   4 . 8  <0)W A : frmPrintReport
)A0  =^   c E ! A  = 1 ) c 7A! - 8 - N( <OA
 =)    <? ;7B DataGrid B ) = /$ =^ <W
 B    CL " ^ <W " <W  ^
  ?= < A ;7R  A   C N .. ) 4 A L! CT ?;
'R7 V 5t  A ?A

A A0 ?= < A >' 0  ^  ADODC 6 =7


 OA  ;7 ' DataGrid )N

On Error Resume Next


Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path +
"\Data.mdb;Persist Security Info=False"
SQLs = "SELECT FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " &_
"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Set DataGrid1.DataSource = Adodc1
DataGrid1.AllowAddNew = False
DataGrid1.AllowUpdate = False
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Adodc1.Refresh

A?
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path +
"\Data.mdb;Persist Security Info=False"

=^ !  A  R; 7  ? ADO < DE 1'    < 8N ! 


ADODC

+   " ' R) >' B' ! 1  A0 <D^  bR 8C=


ADODC  E !  0 /!  '/$= ' M   A? E ! "' ,7!

SQLs = "SELECT FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " &_


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs

A?  < 6 1
SQLs = "SELECT FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , "

;7 8! 1 /T )= B=> )  ! )= B= < 6 E !   B 6 


bR5 +  8  1 5t) A ( FullNames " b   A ; A 
. ali jassim ali albasri <0)$
 ; A  ;7 5B 6    ;  As < 
(\ 6 =) ) )! ; ! B' ; Adodc1.RecordSource <
A . OA  6 ! B=> ! A?) " ! A? ; 7  7  
. 5 " A4   ADODC O='
Set DataGrid1.DataSource = Adodc1
< 0) )  N '  DataSource ! 8B6 DataGrid )N '  SET 
 ) A  5 ytO' y B=  =; . adodc  5 y ;=
. ( B; ?< 7 ) ?; )=  .. B )N '
DataGrid1.AllowAddNew = False
;7 ? . )N '  E ! ) 6 84 <7T /$= ' V .. < 6 <DE )N ';  7
;7 ) 6 < 7T )= 1 ;? False < N 5  < D^ bR 8$B=  N R  +) 
c<
DataGrid1.AllowUpdate = False
84   c) ' ;  $
 <D^ bR VR
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Adodc1.Refresh

y ; =  7 "  ? ]  8 A 8D; 7 lblCount.Caption bR


0; E R='

(( lblCount  Label9 ! bC' ' ))

: 5O + A? 8
O 
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"

" " <7 ! T " & 4  ( = )  "  8 ;E ?  )   8B6


Adodc1.Recordset.RecordCount < &   
Adodc  5 ytO =R 4     /6  < 'bR
" 84 " & " " & <7 ! T VR

: <0)$ bR5 B=>  8 8? A?


( Number The Records Is 10 Record / Records ) 4/84 10 4 

'? <  ;N?A


Adodc1.Refresh
 87 B  ) 8B6 VR ;7 Cursor ( 84
 +)  ;7R )  8=; ;7R  A :
  ;7 cA0 ) 1 N =) ( <OA5  ;7 ' . )N A  =^  =B= Change C . 8  <0)W bR5 < 4<0)$
 ! )?=\  =^  < !  !  < !A6A ;7 0 )==B ! 5T ! NN  A6A ! ..  !   = )=
' <O   <  A6A  ;7 8BO 0 !!
 CTL! CT Text1 80

  V  Change
?; 'O= R7 V ?A ' 

y ?= C=;  7 A? R ?= < N

Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"

: ! 8? A?
..  N   0 ) A?
" " ]7 5 A0 A?' !  :: 


Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

;= A? RO ' =)


RO ' =) ]7 ^!~  / c+; +  80 A?) !  ! 
: ;=!
SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _
"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs

O=) "B6 adodc   B=><  OA N 8! 1    B=


< 0
Adodc1.Refresh
( 84 ; 7 Cursor 8B6 VR  ) B 7 8 B N
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"

<< =0)W ' N .. 4     5


Exit Sub
/
5

RO ' =) B! AC! A0  A?) !  M=) 1 ! B7 :: ;+  0!
 A? L4 A .. L )=  '07 6 85 A 8)AW ~ A? R . ! R
: N
sql < 6 1

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _
"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"

: ;= < '  4


 87 "  ; A  ;7 5BT< ,B  4    1   B=
:  OA  6 ! ,A OA  N A  !   B= FullNames
<A5 ; ])< 7 ! ...  2 y ?=" 7! ")  1 y ?=" 7! ") 1

FirsName Like ' " & Text1 & " % '


A?) \ 4) " ; B' ' % <!B bR 1 )"  < ! R 1  c ; B) R
.. < ? L6
.. 5 =)  "5 =! A? < 6 ;N
( Change C=;  7 ) A0 / 6 ;7 "BT M   A?
Text1 ,Text2,Text3,Text4,Text5,Text6

Command1 " <W " L  < =   /6

R) 0=<   $ ^A? ?= < A0 ;? .. L! CT L  CT


A? R =\ . 0 ! "  =  N

Set DREmp.DataSource = Adodc1


DREmp.Show 1

A?
Set DREmp.DataSource = Adodc1
( Adodc " )  !  B6) ) 0=     ^
DREmp.Show 1
show 1 ..  ,  .. / 4 A7 "B6) 0= 5

.. A  R  ! 5= R?
" A! / OA < ! A 4! <W " A  8!? A? A R

;


Set DREmp.DataSource = Adodc1


DREmp.Show 1
/
5




On Error Resume Next


Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path +
"\Data.mdb;Persist Security Info=False"
SQLs = "SELECT FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " &_
"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Set DataGrid1.DataSource = Adodc1
DataGrid1.AllowAddNew = False
DataGrid1.AllowUpdate = False
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Adodc1.Refresh
/
5







Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
/
5







Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
/
5

#





Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
/
5

;





Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
/
5

;





Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
/
5







Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
Exit Sub
/
5

SQLs = "Select FirsName+' '+FatherName+' '+GrandName+' '+FamliyName As FullNames , " & _


"EmpNo,Job FROM Emp" & _
"where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 & "%'AND GrandName Like '"
& Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '" & Text5 & "%'AND Job Like
'" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is " & " " & Adodc1.Recordset.RecordCount & " " &
"Record/Records"
/
5

M)W A R A ? B'!  + A ?= < A0' V ' A : <t!


!! ... <4!; 7 >=
") R A  80=  ;? Save O< A0) E !  O :::
" frmSearchEditEmp " "  R A \ 

 =; < 7 V 5t) ;? A    L! CT CT

: ;= " OA   8) B' c " A  R; 7 8 B 


. ( ADODC < DE )  0  >'0=
. EMP OA  6 =7
. C=;  7 OA  6 ! <OA N 1  B=
. DataGrid B; ?< 7  5
. B! ^ 8) B' \W  " OA  8) B' " A  ! 
. 4   5

: frmSearchEditEmp A  8  <0)W
=)  ( <OA - N - 1 ) c 7A=  E ! A   c  =^ A0)
B! ^ ) '  =^ /$= )  B DataGrid B; ?< 7   
A  )= ! A " C  N\ 4 ( CD )  5t) A
( OA  8) B' )
" 07 ) 4 1 "  )=  A  .. !8! A? ?=\ A

+


,


On Error GoTo xxx


Select Case ColIndex
Case 0
SQLs = "SELECT * from Emp where EmpNo ='" & DataGrid1.Text & "'"
End Select
frmEditEmp.Show
Unload Me
xxx:
/
5




On Error Resume Next


Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path +
"\Data.mdb;Persist Security Info=False"
SQLs = "Select * From Emp"
Adodc1.RecordSource = SQLs
Set DataGrid1.DataSource = Adodc1
DataGrid1.AllowAddNew = False
DataGrid1.AllowUpdate = False
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Adodc1.Refresh
DataGrid1.Columns.Item(0).Button = True
/
5







Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select * From Emp"


Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Exit Sub
/
5

SQLs = "Select * From Emp Where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 &
"%'AND GrandName Like '" & Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '"
& Text5 & "%'AND Job Like '" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
DataGrid1.Columns.Item(0).Button = True
/
5







Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select * From Emp"


Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Exit Sub
/
5

SQLs = "Select * From Emp Where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 &
"%'AND GrandName Like '" & Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '"
& Text5 & "%'AND Job Like '" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
DataGrid1.Columns.Item(0).Button = True
/
5

#





Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select * From Emp"


Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Exit Sub
/
5

SQLs = "Select * From Emp Where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 &
"%'AND GrandName Like '" & Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '"
& Text5 & "%'AND Job Like '" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
DataGrid1.Columns.Item(0).Button = True

/
5

;





Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select * From Emp"


Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Exit Sub
/
5

SQLs = "Select * From Emp Where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 &
"%'AND GrandName Like '" & Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '"
& Text5 & "%'AND Job Like '" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
DataGrid1.Columns.Item(0).Button = True

/
5

;





Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select * From Emp"


Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Exit Sub
/
5

SQLs = "Select * From Emp Where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 &
"%'AND GrandName Like '" & Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '"
& Text5 & "%'AND Job Like '" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
DataGrid1.Columns.Item(0).Button = True
/
5




Text1 = "" And Text2 = "" And Text3 = "" And Text4 = "" And Text5 = "" And Text6 = "" Then

SQLs = "Select * From Emp"


Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
Exit Sub
/
5

SQLs = "Select * From Emp Where FirsName Like '" & Text1 & "%'AND FatherName Like '" & Text2 &
"%'AND GrandName Like '" & Text3 & "%'AND FamliyName Like '" & Text4 & "%'AND EmpNo Like '"
& Text5 & "%'AND Job Like '" & Text6 & "%'"
Adodc1.RecordSource = SQLs
Adodc1.Refresh
lblCount.Caption = " Number The Records Is" & " " & Adodc1.Recordset.RecordCount & " " & "Record"
DataGrid1.Columns.Item(0).Button = True
/
5

: 07 ) 4 A 
L  C  A) N ' )  6  07  )  ) 4


+


,


On Error GoTo xxx


Select Case ColIndex
Case 0
SQLs = "SELECT * from Emp where EmpNo ='" & DataGrid1.Text & "'"
End Select
frmEditEmp.Show
Unload Me
xxx:
/
5

. "7AO  N" 7B   < ' =^ bR Select Case ColIndex

< 

... 2  1  0 N" ! 7AO '


( index 5< 7AO! ;) N ' 
; B ) 5 <B =< 7AO   B=' <  bR
<7AO  OD 0 A" BNA! A  N
+ 7
"7AO  " ! R N A B  B=' <  
Case 8 ) R ! RO '< ( 7AO  N ) ?; Case 5=E /! A?' select <
1 0 
+!

07  ~ 07  ! ^= R  +)  ;7
Case 0
SQLs = "SELECT * from Emp where EmpNo =' " & DataGrid1.Text & " ' "
. < A$ < 0)$ ; yNA= E R 07 N A  ;7 5t) L  N   \
: ( A? < 6 ) ;= A?  BT 0 "7AO  Case 0 ~?; 7
SQLs = "SELECT * from Emp where EmpNo =' " & DataGrid1.Text & " ' "
 '
) ) N ';  7 A B )  A  N  OA  6 !   B=
( 0 N< 7AO 
End Select
Select y? )< < 5
frmEditEmp.Show
( OA  8) B' ) A  5
Unload Me
R ; ! A  8 ' ;C .. ; OE
On Error GoTo xxx
A?  LO0) :!\ ! $ .. 7 B! $E A?) !  .. $E!
xxx: 8\  R)
DataGrid1.Columns.Item(0).Button = True
( )N ';  7 /' /$= ' ! R E ! ) Button <D^
N ) ' V ..  . ;+  A B; 7 A 8 Item(0) L' !?
( .. A B "7AO 
0 ! 5 ' " \ .. 5 =)  A; N

") R A  80 ?;  =Save O< A0) E !  O :::


" MDIForm1 " "  R A \ 

L! CT CT    A ?; ) < ;7 V 5t= 

 ;7 8 BR  A "  A  " :! ; ,=; :


=0 >' 0  .
6 =7  =^ ! . Users
=B ! 6  =^ ! ?;   .
5   =^ ;7 . StatusBar
' 8$B  =^ ! )  ( .
 L6 E ) 6 = !  .
8  <0)W A : MDIForm1
 ' 84 AE  !A : )= = !   =^ 8$B' =) ;?
  =; ? ) 1ADA  5A VR )= /T  =^ ) ;7
< StatusBar' 8$BA0 ,=; ~ " AE  <D . 5

R7 V =O ?; 'L! CT MDIForm1 A   CT ... A? ?= < A0 


.. A?

)B= A0 A . General ; =)7 A?' A R7 ;  7 V'


.. 5? ) ;= ?;   =^  N 57 L^ ;? C=!
.. B  7  8? " =) A ... A? R=\

Dim GAdd, GEdit, GPrint, GCreateUser As String

 ! / = )B =C ? < ) DIMR B' y ;7A4O  V


?; 'B != V \4) C= <  < . ( .. 5N DIM
N  = )B C=! <B  =; :
L^)  GAdd    < " A?) !  " <7T   =^ <DE><7T
L^)  GEdit    < " 'A?) !  " 8) B   =^ <DE=8) B
L^)  GPrint    < " A?) ! " <W   =^ <DE<$
L^)  GCreateUser    < "  ! =^ ! " ! )?A   =^ <DE
  =^ !
B>=5 ! = <  =C A ..  ) L6 ( A0) Sub =  V

)A0 =^ )L < ) - <W - 8) B' - <7T ! =^ ! ( ;7 =C B=
 =^ R bR
!A0 : <t ' , A? 5B! 8!B= ;? <E .. ' N=  R  ;7
 A0R= .. , 07\  ;7 =     8 + :
!  ' E 84

 CT' ;? 1O= R7 ?A ?; '   < ,0  : TA! A

 ) ,A0 =;    A?= B) A " \ .. R= 07 R


.  ,A0 8$B' ;  7 Toolbar M+ 
General  N ;7 0 !  N   +)   /6 
: A? R ?= < N


On Error Resume Next


GAdd = ""
GEdit = ""
GPrint = ""
GCreateUser = ""
PoolConnection
SQLs = "Select * FROM Users Where UserName='" & UserNames & "'and Password='" & UserPassword &
" '"
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' <7T
RS![GAdd] = True Then

AddEmpMu.Enabled = True
Toolbar1.Buttons(6).Enabled = True
GAdd = " <7T"
/

AddEmpMu.Enabled = False
Toolbar1.Buttons(6).Enabled = False
/
5

' 8) B'
RS![GEdit] = True Then

EditEmpMu.Enabled = True
Toolbar1.Buttons(5).Enabled = True
GEdit = " 8) B' "
/

EditEmpMu.Enabled = False
Toolbar1.Buttons(5).Enabled = False
/
5

' <W
RS![GPrint] = True Then

PrintReport.Enabled = True
Toolbar1.Buttons(4).Enabled = True
GPrint = " <W "
/

PrintReport.Enabled = False
Toolbar1.Buttons(4).Enabled = False
/
5

' ! ^= ! 
RS![GCreateUser] = True Then

CrUser.Enabled = True
EdUser.Enabled = True
GCreateUser = " ! ^= ! " 
/

CrUser.Enabled = False
EdUser.Enabled = False
/
5

:A? ! 
MyGrants  L6 
Sub MyGrants()
' 6> R5 ^A? 
End Sub
! ^=  6 E ! B=> < ; ) B! <  "7 A?' A sub L4 R
..  8$B' =) ;? (  =^ A6A    B=
On Error Resume Next
:! 0) 0' 1 ..  = $E 
GAdd = " "
GEdit = " "
GPrint = " "
GCreateUser = " "
( < N 8 ' 1 <]7 5B6 ) C= ; 7 ;= 0 7 N
PoolConnection
( 1'> =" ) < E !  >'0= N
SQLs = "Select * FROM Users Where UserName='" & UserNames & "'and Password='" & UserPassword &
" '"

:  ' B=> < 6


UserNames C=   =^ !    =^ )  6 E !   B=
UserPassword R; 7 L^  C=    <   '  R; 7 L^ 
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
5C' < 4 RO = N
' <7T
... V  A4O; 7 54' =) .. MB' < 6  < 4 ...

RS![GAdd] = True Then


< 0  )" User 4; 7 GAdd "  R< ( 7T ) 80 8 . M0= )= B=> B
B A4  True
AddEmpMu.Enabled = True
(( <7T < )) ,0 = ? N
' N ( 0 ! 5  < =;  = ,0 )  bR AddEmpMu < ? : <t!
V
Toolbar1.Buttons(6).Enabled = True
!  0; E R='  . ( <7T ) L 8 ) R N  Toolbar1 ; 7 
Index <7AO ; 7 N 8? Toolbar1    

) L R5 ? ' 8  A? E ! \$  6 N A L Index  N 1


  =^ ? ! ( " C 8 N "B4)
GAdd = " <7T"
( <7T < ; ) 0 bR O A0) ;? 0 ! "O)B' ' R C= 
. C= ; 7 5 )L^' =)< " 7T  < " O =) A  R  A?  ! ) 

Else
False True < N <)  ~ [GAdd] 80 V   ]
: A? R  AE  )= A
AddEmpMu.Enabled = False
(( <7T < )) ,0 8$B= N
Toolbar1.Buttons(6).Enabled = False
6 " Index  N R< (( 7T )) L 8$B= N
End If
IF < 6 <)5
0B! !A?; N 8
<5 =! A; N - 1 A4 A?) A c) ; 7 L !0; E y A4
5NW 5= ' ;7 C=' 07
5NA7 AD <7T ; ..  =<  $ <7T < B A0 A A? = < B
. 8
8O 5B4 5,E 8) B= A0 A .. ! ' R7  8O A?' ;? A bR 
. R7 
8
5T  ! "7 /T?; )=
: <=  < t . Picture1 AD <7T N

: ;= 5,E C= N


Picture1 Align  2 Align Bottom
: 8? R5 A?' ;?

: ;=" ,E 8) B= N Label1 8 <7T N


Label Name  lblGrant
Alignment  0 left justify
8? R5 A?) ;?

( ..   ! 8 ) ;? ) 8 <7  N


.. L! CT MDIForm1 A   C N ;7T> ! =  5=> B
save O E !  O N
A AO R7 V =O' ;?

MDIForm_Load A AO; 7 A? ?= < N

' Show GRANT


MyGrants
' View Grant
lblGrant.Caption = " Rols : " + GAdd + " " + GEdit + " " + GPrint + " " + GCreateUser
' View User
StatusBar1.Panels(5).Text = " Username : " + UserNames
: A? ! 
' Show GRANT
RO ' =) 1 ... MB' < 6
MyGrants
 ' ) B=> " )= AE  )= A ( y6  " ) !R L4
lblGrant.Caption = " Rols : " + GAdd + " " + GEdit + " " + GPrint + " " + GCreateUser
8 ;E   8B6 A0  ES! " =7T ' R 8 R lblGrant.Caption
" Rols : " + GAdd + " " + GEdit + " "
 .. 8) B' ... <7T : : < 4 bR< $ N
E C=  C=   8O< ?; )= 7 !  B' bR " " +  C=   ?=\ 
.. C  R=  B) A?; N
5 N< 7AO ; 7 <; ) 7   =^ /T\ )= $ 

StatusBar1.Panels(5).Text
; ) E   8B6 ( 5 N 8 ) R A ) < )

= " Username : " + UserNames
- C=  < N RE )= -  ; +  8  :   =^

save O E !  O N 5=> B


< bR V 5t' ;? L! CT ToolBar1  C N

..  =^   C) !  A= ^A? ?= < A0 A


;= A? =\ .. " ^A  8C'" B! 8O=)=
<= < t< t! : A? = < 8N

1 A key  =^ 1 A6A =) ;? "7=B " ;7=A  Toolbar
=\ ?A =;

Select Case Button.Key


Case " addButt "
frmAddEmp.Show
Case " EditButt "
frmSearchEditEmp.Show
Case " PrintButt "
frmPrintReport.Show
Case " HelpButt "
' Here type code
' to connect with File Help
Case " aboutButt "
frmAboutMe.Show
Case " ExitButt "
ExitPro_Click
End Select
: A? ! 
Select Case Button.Key
End Select
=) A ? B 6 5 $=  )= . W B 5B! 8!B= )= Select Case <
. 07 R  +)  ;7 ;=< 0)$
A= /! 8O=' A . R  +)  ;7  ! +? /! Select Case <  8O='
;? E ! A?; 7 AE  8   ?~ 8  " Button.Key ) ' =) 
/=) R A? RO ' ^ ?; 1< 7B! \   ! RO ' =) .. L Key
Case ~ 8 key   B=' Select < 6 A=  C  .. "
. ! RO ' =)  ! ?; 1 8 ' ;=  ?~ c )= . key " 7 B!
Case " addButt "
frmAddEmp.Show
key : addButt  8 ) ?~ 
8E; 7 R A? RO ' =) A addButt Select < 6 /6' !  ; B) R
frmAddEmp.Show A?~
( OA <  7T ^A  5 )
.. M  ~ O A?; N

Case " ExitButt "


ExitPro_Click
! RO ' =) A=; 7 A6A  E  C  ! )= ExitButt ~?
ExitPro_Click A; E
( " E " < ,0 >'A0) )
 =; )< 7  =;  7 " = = ' R ( E ) < ,0  ExitPro : <t!
: < ,0 = ) N \  =  Save O E !  O
E 84 '  !

^84 = ^A? R ?= < N  . A? R7 =O' ;? 5 CT

UserNames = " "


UserPassword = " "
Load frmLogin
Unload Me
frmLogin.Show
: A? ! 
UserNames = " "
UserPassword = " "
.( A  A; 7 ) C= ; 7 <L^  0 7 N

Load frmLogin
" R; 7 AE  84 ' " A  8 = N
Unload Me
R ; ! , A  C N
frmLogin.Show
"  =^ AE  84 ' " A  5
save O E !  O
: =E < ,0 !

E  !

: A? R " =\ CT

MSGExits = MsgBox("Are You Sure To Exit ? ", vbQuestion + vbMsgBoxRight +


vbYesNo, " Exit ")
If MSGExits = vbYes Then
End
End If
! A ) 6  ! 6A) ?   O;   7 8N ! < bR' 
End
!! ;,5 8? :! ! E ; B) R
OA <  7T<  7T

: =E < ,0 !


: A? R " =\ CT
frmAddEmp.Show

( OA <  7T A  B N ) b B! R


OA   8) B'  8) B'

: =E < ,0 !


: A? R " =\ CT

frmSearchEditEmp.Show
( OA   8) B' A  B N ) b B! R
! ^=   

: =E < ,0 !


: A? R " =\ CT

frmCreateUsers.Show
( ! ^=   A  B N ) b B! R

! ^=  8) B' 

: =E < ,0 !

: A? R " =\ CT
frmEditUsers.Show

( ! ^=  8) B' A  B N) b B! R


   < C' 

: =E < ,0 !

: A? R " =\ CT
frmChangePass.Show

(    < C' A  B N ) b B! R


: =E < ,0 !

OA! / A! <W  )0'


: A? R " =\ CT
frmPrintReport.Show
( OA! / A! <W A  B N ) b B! R
   B=   B'

: =E < ,0 !


: A? R " =\ CT

B  7 5 =) A <D^ bR; 7 A )= = <


:!    B'

: =E < ,0 !

: A? R " =\ CT
frmAboutMe.Show

( ( ;  R ) :!   A  B N ) b B! R

save O E !  O


$E; ! E :!
 = 4=; N ? .. A!  ! ]\ 5=

: < ,0\ !
Project  EmpInfromation Properties

: < bR VB! =O' ;? 5 CT

 V= A0) A R " frmCheckUser " A  Startup Object  ! 


?)   0 t  )=  ! ) 7 4 A?) !  ! ^=  6
. AE  84 ' A  5 )= VR

O N  ! E Save O
/ 6 =O N  R N    A6A ;7 8  Text +  A
)  <7T  ( OA t" :

 t A0 A '  0>=7E ! 5 N Text1,Text2,etc <T


^ ) = N ) . Text <D  80\  ^R N  Text <D  < 0=; ( "7

R   ;E>=7 / 6 ;7 Text ;T  A?) ;? ... ?A  8 =; :

.. A0; 7 <T=7> A  / 6 R ! 5=> B


Save O E !  O
" t  "  ! ) frmCheckUser A  = ) N
: <=< D^ T
StartUpPosition  2-CenterScreen

: <= !  
<  B bR M W
frmLogin  AE  84 ' A 
frmChangePass  <)  ? < C' A 

MDIForm1 ; , A \ 
   < C' 

: =E < ,0 \ 

: A? R ' A .. A? R7 =O' ;? 5 CT


Private Sub ChanPass_Click()
frmChangePass.Show
End Sub
: A?)  L bR ?= < N 07
Private Sub ChanPass_Click()
frmChangePass.Show 1
End Sub
 0=> ) ? 1 L !A?) A  A5 A ! A ; B) R 1 N  OT 07
" ! 5=> B 1
 E# A 
: " B  A? 8? R

Save O E ! ..  O


: 8! ; , A  ;,5  A? R

Dim GAdd, GEdit, GPrint, GCreateUser As String




On Error Resume Next


GAdd = ""
GEdit = ""
GPrint = ""
GCreateUser = ""
PoolConnection
SQLs = "Select * FROM Users Where UserName='" & UserNames & "'and Password='" & UserPassword &
" '"
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
' <7T
RS![GAdd] = True Then

AddEmpMu.Enabled = True
Toolbar1.Buttons(6).Enabled = True
GAdd = " <7T"
/

AddEmpMu.Enabled = False
Toolbar1.Buttons(6).Enabled = False
/
5

' 8) B'
RS![GEdit] = True Then

EditEmpMu.Enabled = True
Toolbar1.Buttons(5).Enabled = True
GEdit = " 8) B' "
/

EditEmpMu.Enabled = False
Toolbar1.Buttons(5).Enabled = False
/
5

' <W
RS![GPrint] = True Then

PrintReport.Enabled = True
Toolbar1.Buttons(4).Enabled = True
GPrint = " <W "
/

PrintReport.Enabled = False
Toolbar1.Buttons(4).Enabled = False
/
5

' ! ^= ! 
RS![GCreateUser] = True Then

CrUser.Enabled = True
EdUser.Enabled = True
GCreateUser = " ! ^= ! " 
/

CrUser.Enabled = False
EdUser.Enabled = False
/
5

End Sub
Private Sub AboutMu_Click()
frmAboutMe.Show
End Sub
Private Sub AddEmpMu_Click()
frmAddEmp.Show
End Sub
Private Sub ChanPass_Click()
frmChangePass.Show 1
End Sub
Private Sub CrUser_Click()
frmCreateUsers.Show
End Sub
Private Sub EditEmpMu_Click()
frmSearchEditEmp.Show
End Sub
Private Sub EdUser_Click()
frmEditUsers.Show
End Sub

MSGExits = MsgBox("Are You Sure To Exit ? ", vbQuestion + vbMsgBoxRight +


vbYesNo, " Exit ")
If MSGExits = vbYes Then
End
End If
End Sub
Private Sub Log_Off_Click()
UserNames = " "
UserPassword = " "
Load frmLogin
Unload Me
frmLogin.Show
End Sub
Private Sub MDIForm_Load()
' Show GRANT
MyGrants
' View Grant
lblGrant.Caption = " Rols : " + GAdd + " " + GEdit + " " + GPrint + " " + GCreateUser
' View User
StatusBar1.Panels(5).Text = " Username : " + UserNames
End Sub
Private Sub PrintReport_Click()
frmPrintReport.Show
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "addButt"
frmAddEmp.Show
Case "EditButt"
frmSearchEditEmp.Show
Case "PrintButt"
frmPrintReport.Show
Case "HelpButt"
' Here type code
' to connect with File Help
Case "aboutButt"
frmAboutMe.Show
Case "ExitButt"
ExitPro_Click
End Select
End Sub

'  ?A = ! 8O )< ... O  ! E save O


A A0 =E   8C= N ..   
 tB4  =?
 .. .. 84  A = B E# A=E ! :! <7B$E .
A )= ' $E t .. .. 6
8C N  ! E =.. 8C

;7   $E A )=  5R  <7B$E


)A  ;7 $E 6A " ' 8) B =^ ! " A ^ 5t) 1 " $ "
 ^( Run-time Error '380' Invalid property value ) $

 CT  Debug)< ^$

<  t ... A?    OD A  t


Check1.Value = True
A6A! ~ < N '  
 $E 5  True < N 1 ~A V; $B  !
8 A ! !V ,E ;7
<! " ) V 8B6 =)   Check1 V ,E \ R A 8
.. ,^  t .. ( D

Value < 0 Check ,E ! "<  0   < E !


V! ] - Value = 0-Unchecked
D <! " ATA! - Value = 1-checked
8BO! ] ? D <! " ATA! - Value = 2-Grayed
: +  8  .. 07 N =^ /$= ' : <t!
Check1.Value = 1
( D <! " ) "= N 8B6~ A V
; B) R
. V! ] ; B) " 0 " OD
: ;= C= R5 A0 A? 8) B= A0    ?< 8

: V!! ! A  8) B= B A?)

Dim UserNa As String


Sub FillData()
On Error Resume Next
If Not IsNull(RS![UserName]) Then Text1 = RS![UserName]
UserNa = Text1
If Not IsNull(RS![Password]) Then Text2 = RS![Password]
' <7T>< D
If RS![GAdd] = True Then
Check1.Value = 1
Else
Check1.Value = 0
End If
' 8) B=< D
If RS![GEdit] = True Then
Check2.Value = 1
Else
Check2.Value = 0
End If
' ! ^= <  D
If RS![GCreateUser] = True Then
Check3.Value = 1
Else
Check3.Value = 0
End If
' <$< D
If RS![GPrint] = True Then
Check4.Value = 1
Else
Check4.Value = 0
End If
End Sub

 ?< E A  ~O ;7 .. " ' 8) B =^ ! "


A  ?< =) !  : <D  C  =^ ! =) 1==) 1 ) 5B! 8O
. ( 5 D <! /T ?< ;  ;7  M" '    ,E ~
!A6A .. 57 '   True < N
R ^ ;7 $E  ) $5  = Logical Error :,R ^RO '  5t) 1 $
! . : ) 5t< $E)= )0 ! ... : ..  )= ' RO! ]
.. <D  8 ?< :
\   A " ' 8) B =^ ! "  -  " V  =^ ! "

-L! CT " CT R7 V 5t' ;? .. ?A A ' R ?A

Private Sub Check3_Click()


If Check3.Value = True Then
Check1.Value = True
Check2.Value = True
Check4.Value = True
Check3.Value = True
Else
Check1.Value = False
Check2.Value = False
Check4.Value = False
Check3.Value = False
End If
End Sub
V ,E ;7 A6A! ] < N   '  N 
: ;= A? =\ .. V! ] D ! ; B) .. 0 1 ! 0 /T A 8

If Check3.Value = 1 Then
Check1.Value = 1
Check2.Value = 1
Check4.Value = 1
Check3.Value = 1
End If
: Else <  R \
A0) D ?)  3 V ! )   B7 .. A? RO '  ;0$ ! $E \ ) R : 1

"  ,$ : A  ?< 8 .. ( ?! ] 5B4) ) N   R
 8 A R . 5 N V= N .. V! 3 V 

^ $ : E  A = <   TextA  ;7 t " ' 8) B =^ ! "

! 1 ?=\ " " Text1=  . Tex1 ' ^\=? $


^ $ 6 T
" " Text1=; :

UserNa = Text1
! yR'    ;7 L ! ) ; BR ! .. 8B4 A = < N RE) C80
0 ;? 1 N <  ! 8>=B ) = V  R  =^ !A6A 1 ( .
VR ?< E A  ;7 "   =^ ! " A .  ?< 8) B' ) <?! ~O
 =^ ! ( A /T?A !A  8  B  )=  \ " ' " ! 0
A  ;7 " ' 8) B =^ ! "
 MR ?A A  ;7 "   =^ ! " R ?A   M"0

;


Check3.Value = 1 Then
Check1.Value = 1
Check2.Value = 1
Check4.Value = 1
Check3.Value = 1

/
5

/
5

Text1 = "" Then


MsgBox " Sorry, You Must Type Username ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

Text2 = "" Then


MsgBox " Sorry, You Must Type Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SQLs = "Select * FROM Users Where UserName = ' " & Text1 & " ' "
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS.EOF Then
GoTo SaveOK:

Else
MsgBox " Sorry,The Username Is Exist Befor ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

End If
SaveOK:
Text2.Text <> Text3.Text Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+ vbMsgBoxRight, " Error "
Exit Sub

/
5

SaveMsg = MsgBox " Are You Sure To Save This Informations ?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Save Data "
SaveMsg = vbYes Then

RS.AddNew
RS![UserName] = Text1
RS![Password] = Text2
' <7T>< D
Check1.Value = 1 Then
RS![GAdd] = True

RS![GAdd] = False
/
5

' 8) B=< D
Check2.Value = 1 Then
RS![GEdit] = True

RS![GEdit] = False
/
5

' ! ^= <  D


Check3.Value = 1 Then
RS![GCreateUser] = True

RS![GCreateUser] = False
/
5

' <$< D
Check4.Value = 1 Then
RS![GPrint] = True

RS![GPrint] = False
/
5

RS.Update
MsgBox " The Information Has Been Saved ", vbInformation+ vbMsgBoxRight, " Saved "

End If
/
5

;


Unload Me
/
5

;


Text1 = " "


Text2 = " "
Text3 = " "
Check1.Value = 0
Check2.Value = 0
Check4.Value = 0
Check3.Value = 0
/
5




PoolConnection
/
5

5 $E 5>  <  4= N Save O E !  O


;  7 $E : <?  A "    < C' " A  ;7 : E ?<
" $^  B=' A A   t"

: $E
" \  < "   =^ 4; 7    =^ -1
.. A; 7    =^ 5t) \ 4) -2
D 8? A=?! ]   =^ 1 C=  A  \ .. A C' ? ) 1 -3
$E R   " TA ;  ? 7    =^ 8) B= ) ? ?= < -4
;7 A A; 7 TA  8$=  .. <t! .. 80; 7 < =? 8ON =) \ 4) 5
;7  +)  <)< B6 !V ? ) "  =^ /! 8O= "A C' ' ? 80 " 8D
: ;= A? =\ A 8 .. 07 R=  =
Private Sub Command1_Click()
If Text2 = "" Then
MsgBox " Please Type Old Password ", vbCritical+ vbMsgBoxRight, " Error "
Text2.SetFocus
Exit Sub
End If
If Text3 = "" Then
MsgBox " Please Type New Password ", vbCritical+ vbMsgBoxRight, " Error "
Text3.SetFocus
Exit Sub
End If
If Text4 = "" Then
MsgBox " Please Type ReNew Password ", vbCritical+ vbMsgBoxRight, " Error "
Text4.SetFocus
Exit Sub
End If
Text3 <> Text4 Then
MsgBox " Sorry,The Old Password Not Equel New Password ", vbCritical+ vbMsgBoxRight, "
Error "
Exit Sub

SQLs = "Select * From Users Where UserName = ' " & UserNames & " ' and Password = ' " & Text2 & " ' "
RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

RS.EOF Then
MsgBox " Sorry,The Old Password Is Wrong ! ", vbCritical+ vbMsgBoxRight, " Error "

Exit Sub
/

GoTo OKs :
/
5

OKs :
MSGSave = MsgBox " Are You Sure To Change This Password?", vbQuestion+ vbMsgBoxRight+
vbYesNo, " Change Password "
MSGSave = vbYes Then
' Update Password

SQLs = "Update[Users]Set[Password]=' " & Text4 & " ' Where [UserName]=' " & UserNames & " ' "
RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

MsgBox " The Old Password Has Been Changed ! ", vbCritical+ vbMsgBoxRight," Save "
/
5

;


Unload Me
/
5




Text1 = UserNames
PoolConnection
/
5

  80  " <)  ? < C' A  "  =  < /6 : <= A; 7 " ! A

 ^ ,=; :
Locked  True
R ?; =) 1=  C 80R A ) 8  =^
 O  ! E  Save O < 4= N  >5 $E 5
\   A "  !" :

 CT " !AL! CT " M7 ?; 'R7 V =O ?A =\ ?A =; :

Unload Me
 ) 0 ; ;7    " = 5? 'CD <t! 6A
; <  ;7 :  O =< :
<7T frmAddEmp OA   =^ ! frmCreateUsers <  ;7 "B6 =) O7 A0 ! ! ~ BD / =! y ) ! c )< ..
B OE  msgbox=\ ?A R ) 8B4A0 7]< ?; )?A  A
! .. E# 84 <7T> 5 bR;  <0)$< B
! <tE :   ;7 c   c Adodc1  5,E=; :

Visible  False <,! ] 5B6 ' 8C 

5 $E 5>  <  4= N Save O E !  O


   B' 5= :! .. :!< B =! $E ! ' 5=> B
: ; =< A$^ .. $E
: <= A$^ /' V 8 B .. :! <A0) /T
< ,0\ !
Project  EmpInfromation Properties

<A0) RE) A :!


TA=  )= Icon  1 Make \)A=  80=
;,5  :!< A0) 5B4) ;? " frmAddEmp " "  R A 
Ok  CT
( OA <  7T ) frmAddEmp A   \ Icon <D^ bR ?; ' A  ,E  \ -

.. A  <A0) = ) A R7 V =O   " ?; 'L  CT


save O E ! A  O A  <A0) = ) N
 A < y' " V  A4O ! ] 8 B) " RO ' M$' :! 8B6 //
.. "  =^ B! 8O=) ;? EXE " 8 B L6 M$' :! 8B4
: ;= /' V 8 B
< ,0 ! File  Make EmpInfromation.exe

B! ; !?7 :! O V ! \$' bR7  bR V 5t' ;? 5 CT

B  Employee 2006 +  8  .. T "  /' ;?    C= N


RO = M$=) A?' =) ;? OK  CT V
A<  A0) /! :! 8? ?; 'RO = :!" 7 ytO R 4 \ 
TA!

.. V '  !0 !... ", :!  ! '  5=< 0)$ bR5


..  !=C!
B V,$   ! '" V4! 5 ; 6 < 5! A$E ; .. A$E 
\4) .. 56 8; 7 8 B) V4! 8B4' ;?
+! )A$= =N> " t 
" Setup " )L' :! 8 B' V
A0 A . V4! Setup ! =; '   :! ! +? 6A)
: A ); :!  A  :!
setup /D :! !AB!
Wise for Windows Installer - Professional Edition : :!
http://www.wise.com : :! /NA!

;7 \ ' ) Install :! 8  ! M   /NA  E ! :! 8 = N


:  \ :! ' \ B ( 56
Start  All Programs  Wise Solutions Wise for Windows Installer Professional Edition

<= < bR V 5t' ;? :! 8C= N

: < bR V 5t' ;? Import Visual Basic 5<   A0)  CT

A4O ' )  V ! \$) A / ! V 5t) ;? Browes  CT


"  " 8 B R   . <; 7 TA! A  . " 8 B' R V 
< /6' ;? ?; )= ' )  Open  CT " EmpInfromation"


 CT V 5t' ;? Next bR< =< :

VR  ) 4! ) ' V ! \$   ! 4  /6' ;? Ok  CT


< 

 CT =; 5t' ;? Next< =< :

" B "  CT; 'A0 )' 8    '? EXE " )A B 5 ! =E
?; )=  8 V \6 ^A0 <D  =0) ] ... B>=5
A ' V 5t bR< =< :

bR =;  5 +! : =^ !"  4! ;7; !O !< 6 CT


 =; V 5t' ;? Next< =<

+ ;= O  /! :! ) A R 4   :!  ' ) V ! \$) 


Employee 2006 R  +)  ;7 TA! A =\  .. 5
<= < bR V 5t' ;? Finish 5  CT

< V 5t' ;? Installation Expert "    CT < 8O t


: <=

O < 7T> < bR V 5t' ;? .. !A  Files <   CT

' 8O.. +
;7' 1 N  4   )  4; !A6A "7  (
;7' 2 N N   A6A ! /  ^= ' y E
O /$= ' txt or dll5=7T
;7 ' 3 N   8 +  0 =) ;? 5 C'  5=7T  . setup
)  +)  ;7  5R <7T 0 B .. 07A 5=7T ' 5 5 ;7A~
 8O t< =< ..

\  <56  ?; ' bR< =< :

; 7  ?=\ $   4! =E /' 5= 5! bR Shortcuts  CT


: < bR 5t' ;? 5 CT .. b ) !?

. Delete  CT   R  : <= < 5t' ;? Add  CT -

: V < bR 5t' ;? Next ;= !  CT

;=  CT Employee 2006 "  4!  " TA! A  :!


: <= < V 5t' ;? Next

 CT TA! A  Desktop  .. V4! =E> A? ) V ! \$) 


: <= < 5t' ;? Finish ;=

: <=  T
: V4! =E !  R
Windows\Profiles\Desktop "B6 Dest. Directory
: L)7  ]4! ;7  V4! ! R
Program Files\Employee 2006 "B6 Working Directory
:  < /6= < bR ^ ! ok  CT 5=> B

setup :B  8? C ?; 'Dialogs  CT\   

: <= < V 5t' ;? " CT

V B  \  +  . Theme  ' ) E ! :B  8? T /$= ' 


Compile <  ?; ' 8O"  6A'

: <= < V 5t' ;? Compile <   CT

/NA! ) ' ' Setup +  8    =\  setup  !?   ! 


. ", ?; )= Save  CT C  0; 7 >

 )=  !  setup'? " )A ;7 "BT0  . C


B>=5 ) V \4 '= " '  ;7 ", ? R  '" .. 8N ! y
 ;7 07 t)  8O < V ) A   : TA! A

 ' !< A $E   ..R   8" '   4 SETUP ..


' A
"6  0  ' ;? C !  =\ SETUP

) ? 'A0 = ! < 4  SETUP 56 ~ "7A4O  .. V


bR5A <0)$ ) 8 B!  :56 8 =) 1 '\ A4O  . V

0!
~ A A!A?< B' <0)W
(( ComboBox ))

V 5t ( V 8  5 C ) A ~  A A!A? N


.. ;= 8?

.. ( Form_Load 8 =; )  7 A? =\ V 8 A   C N


.. <= A; 7 

A 8+! ( B! A? 8O' < ) =$0 A=! ~A A!A?;  )<  7 \=
 !< " =\    AN =7 .." AddItem " = ^ E ... <0  
.. <= A t? O TA= ... " M] ~A A!A?; 7 bA5

:
! A? A R



Combo1.AddItem (" Excellent ")


Combo1.AddItem (" Very Good ")
Combo1.AddItem (" Good ")
Combo1.AddItem (" Failed ")
Combo1.AddItem (" Poor ")
/
5

! F5  C E ! :! 8C= N 8 =;  7 A? R = < B


.. <= A; 7 <4=   ' .. ; ) 7 8C= E ! A?

: ; .. bR; 7 6 < 5! <DE 


( Run ) "C' ~ A A!A?; 7 \=?' ') 8 .. <);  7 V 
.. 0 B' R A A

: ; R< 0$ ; 7 < =? / ' < DE  BW


~A A!A?; 7 < =? ! VB ' R Dropdown List =E Style <D^!

.. ( BW 8C=   ) C'~ A A!A? 8? = ^R5 =E B

: ==' A  t ...  O yt1 8


Dropdown List

< =? 8 N ]

Dropdown Combo

< =? 8 N

 <O= <E /T)


)' 8= <E /T) V4! ;7 ! 8+A =< ..

'B  8 B^A$ !< ...


! 1 1 <7T ) 6 ..? <O <7T ) 6 ' /^A$ =< ..

Ctrl+T CT ! Project < ,N=E Components
= < ,N V 5t =E= Controls \)A  =< ..

B=E  A! =E )  5BTA M7 =; ..

T   A )  C 8 ( 5 V Label T "


=; ..

 N ;7 A ] ! 5,E=; ..

C' B^ <D  ( Mask ) <0 0 = .. A5  b A


=; ..

8C= N A =  = ' <4?R ..

6 ' \=?' V) .. "7?   8 + =; ..

B ' y B ' ' <E) ;7 A 6 ! <7B <O7


 < 0 A6A O  ) ! 57  )A  V ? 8=; "7 =< (

') 4   C  O =) O N ;7  ! =) 


7  5=) ;? ) 6 ! 80E ! ... ) 6= 0?O yD<T
..
B' y 7 =? A y~ )?A R5 ?Text1 = " " .. 8
? >7 <E=) =;  6 !   =^'  0=? A y~ ..
<CD bR7 ^< ! =) ..
"____MaskEdBox1.Text = "__/__/
BW ... MaskEdBox1R   ; !A6A   A ../6
R  5=71A0    .. ;T =. bC
^ 5 , 'A


! VR

 L 86 )= ; ! 80R  8 B   <! E ;7 80 
 {


N c  L  86
   } AAN  
; tB
D
 B

) / 6 M7A  !S  !S A' ! / 6 "  )=  N ! / 6 
  )L ..
= < A+  ! M "#$) A 1 "7 .. AN 1 1

 ;B... tB
R  8 B C / 6  !S  !S        E
   =;  ; ;=$E L ;,N D ;,? E  L)L ;
     A$ R  ! ;7 ;B4 R  8 B VRL)L ;C  
   OB6 5
 5= M7A ! ;  / 4  !S  !S

  ..  /  
 BA8
O ;7
?) " .. 5 " W7  ; B6L ;7 56  E1 "

; 6
Norton_k_sa@hotmail.com
www.vbteam.net
-------------------------------------------'  M' MN!: ;,
  !   OB65
Gafer343@hotmail.com
Created in :
Saturday : 23/12/2006 Time : 2:54 PM

You might also like