VERSION 5.00
Begin VB.Form Form20 
   Caption         =   "Form20"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form20"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   840
      TabIndex        =   4
      Top             =   960
      Width           =   1215
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "D:\dd.mdb"
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   300
      Left            =   600
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "dd9"
      Top             =   2400
      Width           =   1140
   End
   Begin VB.TextBox Text1 
      DataField       =   "amoun"
      DataSource      =   "Data1"
      Height          =   495
      Left            =   1320
      TabIndex        =   0
      Text            =   " "
      Top             =   1680
      Width           =   1455
   End
   Begin VB.Label Label3 
      Caption         =   "اجمع"
      Height          =   495
      Left            =   960
      TabIndex        =   3
      Top             =   480
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "المبلغ"
      Height          =   495
      Left            =   2760
      TabIndex        =   2
      Top             =   1680
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "القيمة المدخلة"
      Height          =   495
      Left            =   2760
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
End
Attribute VB_Name = "Form20"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim no() As Integer
Private Sub Label1_Click()
Static i As Integer
ReDim Preserve no(i) As Integer
no(i) = InputBox("enter the value")
i = i + 1
End Sub

Private Sub Label2_Click()
Text1.Text = Text1.Text & vbCrLf & no(i)
End Sub

Private Sub Label3_Click()
Dim k As Integer, tot As Integer
For k = LBound(no) To UBound(no) Step 1
tot = tot + no(k)
Next k
Text2.Text = tot

End Sub
