Null
Null
.
.
Asp
. ...
... vb4arab
.
:
Hammada2091@[Link]
.
Software Anylsis . : . * . . * * * *
. . .
. . . . .
. . . . ) ( ) . . : . . . : . ( ...
* * * * * * * * .
DFD
. .
. .
. ) . + + .
: :
* * * * * * *
. . . .( . . . . . . + + + + +
: : : : . : . : :
* *
+ .
. * * * . .
DFD . ERD
. Tb_Factory Auto Number . . Tb_Category Auto Number . . / Yes/No View . False . . : Auto Number . Number * Primary Key : : . : Number * Primary Key : Name * : . : Number * Primary Key : Name * :
Field Size
Text
Field Size
Text
Tb_Product
Text .
: Name * Size Factory * Field Size Category * Size ) Price * Number .( , . ) Count * .
.
: .
. .
: .
Tb_Sel_Bay
Auto Number . Field . . . Number .( Byte . ) Number ( / Date/Time . Short Date Number
Number * Primary Key Product * Size : Date * Format Count * . Price * Kind * )
Yes/No . (
Tb_User ) . . .
. (
: ***
. ( Rigistery ) . . Text
. . .
***
: More *
: Tb_Product - Tb_Factory - Tb_Category - Tb_Sel_Bay . ( Show Tables ) Tb_Factory . .. . Number . Tb_Product Factory ***
Category
Tb_Category . Tb_Product
Product Product
... Tb_Sel_Bay
Exuclusive Securty
Tools
**
: . ): . ) . . ) . .( ) . . Project - Add Border Style : None ... . API Form Form Form : ( ( ( .( : : : *** ) : : :
. MDI Form MDI . MDI . . . Reslution * * . net. . ... ... . MDI Form New MDI Form ... Form Project API
WindowState True
...
. MDIChild .
. Maximized
.
...
[Link]
. Index ( . . . F1 Ctrl+F4 Ctrl+B . . Ctrl+S F2 ) ( Index=1 File ) Index M_File1 File . ...
. ) . Click . File ( File Index . Index (Private Sub File_Click(Index As Integer Select Case Index Case 0 "MsgBox "View Product Case 5 End Case Else MsgBox File(Index).Caption End Select End Sub Index
[Link]
: AboutMe . Dialog
. . System Info
.
. : Frm_splash .
. . . . . . . . .
: Frm_Add : Frm_Add_2
MaskEdBox
Ctrl+T
Ctrl+T . . RichText Ctrl+T rtf . . : : Frm_Info Microsoft Flex Grid 6.0 : Frm_Help :
. . . . MSChart Ctrl+T
. . . . . .
ProgressBar Ctrl+T . . :
. . . . ... Ctrl+T
: MDIForm1 :
ToolBar StatusBar
CommonDialog
.
.
. +
***
. Dao
DataReport
. .
Dao
Ado
...
.
Properties Dao
Methods F2
...
. Module
New ...
...
Module
StartUp
... :(
: Public T1 As Recordset Public T2 As Recordset Public T3 As Recordset Public T4 As Recordset Public T5 As Recordset
...
.
.
: Public Info(5)
...
Array
.
:
.
If Dir(Folder & "[Link]") = "" Then MsgBox " vbExclamation" " 'Here We will Create The Database End If
"
[Link] [Link] [Link] [Link] : If Dir(Folder & "[Link]") = "" Then MsgBox " End End If vbExclamation" "
"
D1
Set D1 = [Link](0).OpenDatabase(Folder & "[Link]", False, False, ";pwd=" & PassWord( : D1 T1,T2,T3
. *** . Ado
.
Frm_About.Show
...
...
[Link]
. BrderStyle
BorderStyle = 3-Fixedialog
* *
Splach Screen
...
.Timer . . T4 . Tb_User
Format
(info(5
:
.
Private Sub Timer1_Timer() Set T4 = [Link]("Tb_User", dbOpenTable( [Link] Unload Me If [Link] = 0 Then [Link] Frm_NewUser.Show 1 Else Info(0) = T4!User_Name Info(1) = T4!PassWord Info(2) = T4!Name Info(3) = T4!Telephone Info(4) = T4!More [Link] Frm_Login.Show 1 End If End Sub
. =
BorderStyle
Unload
X :
Private Sub Form_Unload(Cancel As Integer( End End Sub ( : Form_Load [Link] & " True ) . Caption . Caption
kernel32
GetComputerNameA :
Public Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long :
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long . . API :
: Form_Load Dim A As String * 256 Dim X X = GetComputerName(A, 256( [Link] = Left(A, InStr(A, Chr(0)) - 1( ( : . .
) . End
* *
*
Private Function Check(A, B, C, D, E( End Function . . . : If A = "" Then MsgBox " " Check = -1 Exit Function ElseIf B " = .
" vbExclamation
"
MsgBox "", vbExclamation" Check = -1 Exit Function ElseIf Len(B) < 3 Or Len(B) > 12 Then
" vbExclamation
"
If C = "" Then [Link]" End If If D = "" Then [Link] = "0" End If If E = "" Then [Link]"
"=
[Link] = [Link] & vbNewLine [Link]/vb" [Link] = [Link] & vbNewLine End If
Hammada2091@[Link]"
VbNewLine Enter
. Add_User ( If Y = -1 Then Exit Sub Add_User Add_User : Set T4 = [Link]("Tb_User", dbOpenTable( : [Link] : T4!User_Name = [Link] T4!PassWord = [Link] T4!Name = [Link] T4!Telephone = [Link] T4!More = [Link]
. [Link] . Info(0) = T4!User_Name Info(1) = T4!PassWord Info(2) = T4!Name Info(3) = T4!Telephone Info(4) = T4!More [Link] : MsgBox & " : arabic" . Public Sub Start() End Sub " Start Module
Add_New
Private Sub Text4_KeyPress(KeyAscii As Integer( If KeyAscii < 48 Or KeyAscii > 59 Then Beep KeyAscii = 0 End If End Sub . .
. Log in Form
New . ( . : ) .
...
X
(Info(1
(Info(0
:
. If [Link] <> Info(0) Then MsgBox " ... vbExclamation + arabic" Exit Sub End If If [Link] <> Info(1) Then MsgBox " ... arabic" Exit Sub End If "
***
"
"
" vbExclamation +
. . Len
(
) SetStart Len
. ... .
Start
"
vbExclamation + arabic" " [Link] = 0 [Link] = Len([Link]( Exit Sub End If If [Link] <> Info(1) Then MsgBox " ...
" vbExclamation +
arabic" " [Link] = 0 [Link] = Len([Link]( Exit Sub End If [Link] Call Start
. :
My_Count = My_Count + 1 If LCase([Link]) <> LCase(Info(0)) Then MsgBox " ... " vbExclamation + arabic" " [Link] = 0 [Link] = Len([Link]( If My_Count = 4 Then End Exit Sub End If If [Link] <> Info(1) Then MsgBox " ... arabic" "
" vbExclamation +
[Link] = 0 [Link] = Len([Link]( If My_Count = 4 Then End Exit Sub End If [Link] Call Start Start . .
* *
" = Info(2(
.
Label2 .
[Link]
) .
(
Index
. End .
YesNo .
No :
")vbExclamation +
vbYesNo + arabic(" " If Sure = vbYes Then End . True Cancel Unload X .... : Cancel = True Dim Sure Sure = MsgBox " vbYesNo + arabic(" If Sure = vbYes Then End Cancel X Unload False
Unload
"
")vbExclamation +
Cancel=True :
")vbExclamation +
AboutMe . . : Load
Frm_Splash
[Link] = "About " & [Link] [Link] = "Version " & [Link] & "." & [Link] & "." & [Link] [Link] = [Link]
...
Project Property
Project
Text
. RichText ... X .. . . Microsoft RichText Control 6.0 Ctrl+T Wordpad . [Link] ScrollBars FileName .. . :
: Frm_Help.Show 1
[Link]
...
Case 0 If [Link] = 0 Then MsgBox " vbExclamation + arabic" Exit Sub End If Frm_Show.Show . Frm_Info : Load BorderStyle=2 "
"
Frm_Show.Left = (([Link] - Frm_Show.Width) /2 ) Frm_Show.Top = (([Link] - Frm_Show.Height) / 2) - 800 Refresh_Me . : Sub Refresh_Me() [Link] If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 [Link] T1!Name [Link] Next i End If
Form_Load T1
Sorted
. True
.
. MSFlexGrid
: [Link] . [Link] Row Col . . Text Cell Cols Rows Create_Flex + = = . : [Link] [Link] = 7 [Link] = [Link] + 1 Clear :
[Link] = 0 [Link] = 0 [Link]"" = [Link] = 1 [Link]" " = [Link] = 2 [Link]" [Link] = 3 [Link]" " = [Link] = 4 [Link]" " = [Link] = 5 [Link]" " = [Link] = 6 [Link]" " = [Link] = 7 [Link]" / "= "=
...
. :( )
) ( )
. Refresh_Me . i+1 .
Refresh_Me
Sub Refresh_Me() [Link] Create_Flex If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 [Link] = i + 1 [Link] = 0 [Link] = T1!Number [Link] = 1 [Link] = T1!Name [Link] = 2 [Link] = T1!Category [Link] = 3 [Link] = T1!Factory [Link] = 4 [Link] = T1!price [Link] = 5
[Link] = [Link]("Count(" [Link] = 6 [Link] = T1!Box_Count [Link] T1!Name [Link] Next i End If End Sub Count . . : [Link](0) = 5 [Link] = 6 [Link] = T1!Box_Count
MSFlexGrid1
Sort :
[Link] = 1 [Link] = 7
...
. ... . .() . : ( )
. +
[Link] = 0 For i = 0 To [Link] - 1 [Link] = i + 1 [Link] = i + 1 Next i . . : [Link] = 3 [Link] = T1!Category [Link] = 4 [Link] = T1!Factory
. : T1
: T4
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number" Set T4 = [Link](SQL, dbOpenDynaset( . Access . . Refresh_Me . T4 T1!Name T1
Name Number
[Link]("Tb_Product.name("
. Number : [Link] = 3 [Link] = [Link]("tb_category.name(" [Link] = 4 [Link] = [Link]("tb_factory.name(" . . . Row Col Click : MsgBox "Row : " & [Link] & " Col : " & [Link] : T4
MsgBox [Link] :
...
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and tb_product.number =" & [Link]"" & :
If [Link] <> 0 Then [Link] [Link] = [Link]("tb_product.Number(" [Link] = [Link]("tb_product.name(" [Link] = [Link]("tb_category.name(" [Link] = [Link]("tb_factory.name(" [Link] = T4!price [Link] = [Link]("Count(" [Link] = T4!Box_Count
:
...
Tb_Product.name
[Link] = T4!.Fields("tb_product.name(" ... ShowData : Private Sub ShowData() [Link] = [Link]("tb_product.Number(" [Link] = [Link]("tb_product.name(" [Link] = [Link]("tb_category.name(" [Link] = [Link]("tb_factory.name(" [Link] = T4!price [Link] = [Link]("Count(" [Link] = T4!Box_Count End Sub
. T4 .' '
Private Sub Combo1_Click() SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and
tb_product.factory=tb_factory.number and tb_product.name ='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then [Link] Call ShowData End If [Link] End Sub : ...
: ...
[Link] = 1 [Link] = [Link] [Link] = 2 [Link] = [Link] [Link] = 3 [Link] = [Link] [Link] = 4 [Link] = [Link] [Link] = 5 [Link] = [Link] [Link] = 6 [Link] = [Link] [Link] = 7 [Link] = [Link]
.
Index :
. Text1
.
. Text1,Text2,......,Text7
Microsoft ProgressBar
...
. Refresh_Me
Show
ProgressBar . . . . . . ...
. . Frm_Wait
Frm_Show
= :
...
. : Form_Load
Private Sub Form_Load() Frm_Show.Height = 5520 Frm_Show.Width = 8145 Frm_Show.Left = (([Link] - Frm_Show.Width) / 2( Frm_Show.Top = (([Link] - Frm_Show.Height) / 2) - 400 [Link] Refresh_Me End Sub
tb_product.category=tb_category.number and tb_product.factory=tb_factory.number" Set T4 = [Link](SQL, dbOpenDynaset( If [Link] = 0 Then Exit Sub Frm_Wait.Show Frm_Wait.[Link] = [Link] Frm_Wait.[Link] = 0 Frm_Wait.[Link] = 0 [Link] [Link] [Link] Create_Flex If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 Frm_Wait.[Link] = Frm_Wait.[Link] + 1 DoEvents [Link] = i + 1 [Link] = 1 [Link] = [Link]("tb_product.Number(" [Link] = 2 [Link] = [Link]("tb_product.name(" [Link] = 3 [Link] = [Link]("tb_category.name(" [Link] = 4 [Link] = [Link]("tb_factory.name(" [Link] = 5 [Link] = T4!price
[Link] = 6 [Link] = [Link]("Count(" [Link] = 7 [Link] = T4!Box_Count [Link] [Link]("tb_product.name(" [Link] Next i [Link] = 2 [Link] = 7
[Link] = 0 For i = 0 To [Link] - 1 [Link] = i + 1 [Link] = i + 1 Next i End If [Link] [Link] = 0 Unload Frm_Wait End Sub
[Link]
. Delete
:
"
")
: If [Link] = 0 Then MsgBox "! " vbExclamation + arabic " " Exit Sub End If :
[Link] For i = 0 To [Link] - 1 If T1!Number = [Link] Then Exit For [Link] Next i
. :
SQL = "delete * from Tb_Product where number=" & [Link] . Select . : [Link] . Refresh_Me View=False . : A1 = T1!Category A2 = T1!Factory Dao
T3 T2
[Link] For i = 0 To [Link] - 1 If T2!Number = A1 Then Exit For [Link] Next i [Link] For i = 0 To [Link] - 1 If T3!Number = A2 Then Exit For [Link] Next i
If T2!View = False Then SQL = "select count(*) as mycount from tb_product where category=" & A1"" & Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If If T3!View = False Then SQL = "select count(*) as mycount from tb_product where factory=" & A2"" & Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If !!!
"
")
If [Link] = 0 Then MsgBox "! " vbExclamation + arabic " " Exit Sub End If [Link] For i = 0 To [Link] - 1 If T1!Number = [Link] Then Exit For [Link] Next i Dim A1, A2 A1 = T1!Category A2 = T1!Factory [Link] [Link] For i = 0 To [Link] - 1 If T2!Number = A1 Then Exit For [Link] Next i [Link] For i = 0 To [Link] - 1 If T3!Number = A2 Then Exit For [Link] Next i
If T2!View = False Then SQL = "select count(*) as mycount from tb_product where category=" & A1"" & Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If If T3!View = False Then SQL = "select count(*) as mycount from tb_product where factory=" & A2"" & Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If Refresh_Me
Child . . . . Show 1
TabIndex . Frm_Edit
. . MaxLength . =
...
[Link] [Link] [Link] [Link] For i = 0 To [Link] - 1 [Link] T2!Name [Link] Next i For i = 0 To [Link] - 1 [Link] T3!Name [Link] Next i
. .
Dim A1, A2 SQL = "select number from tb_category where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( A1 = T4!Number SQL = "select number from tb_factory where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( A2 = T4!Number Load Frm_Edit With Frm_Edit . [Link] = [Link] . . . . . . [Link] = [Link] [Link] = [Link] [Link] = [Link] [Link] = [Link] [Link] = [Link] lbl_name & " : " = [Link]
. lbl_num = "no." & [Link] End With Frm_Edit.Show 1 [Link] For i = 0 To [Link] - 1 If T2!Number = A1 Then Exit For [Link] Next i [Link]
For i = 0 To [Link] - 1 If T3!Number = A2 Then Exit For [Link] Next i If T2!View = False Then SQL = "select count(*) as mycount from tb_product where category=" & A1"" & Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If If T3!View = False Then SQL = "select count(*) as mycount from tb_product where factory=" & A2"" & Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If Refresh_Me
: Unload Me
(
. :
.no
Dim My_Number My_Number = Mid(lbl_num.Caption, 4, Len(lbl_num.Caption(( . SQL = "select * from tb_product where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then If T4!Number <> Val(My_Number) Then MsgBox " " vbExclamation + arabic" Exit Sub End If End If . "
Dim Num1, Num2 SQL = "select number from tb_category where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( Num1 = T4!Number [Link] SQL = "select number from tb_factory where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( Num2 = T4!Number [Link] . ...
Update :
[Link] For i = 0 To [Link] - 1 If T1!Number = Val(My_Number) Then Exit For [Link] Next i With T1 . Edit ! ! ! ! ! ! Name = [Link] category = Num1 factory = Num2 price = Val([Link]( Count = Val([Link]( Box_count = Val([Link](
: Unload Me ( / )
.
KeyPress :
BackSpace
If (KeyAscii > 58 Or KeyAscii < 48) And KeyAscii <> 46 And KeyAscii <> 8 Then KeyAscii = 0 End If Paste Ctrl+V . Cut ( : If T4!View = False Then MsgBox " arabic" " vbExclamation + " ) Ctrl+X
vbExclamation +
"
"
Exit Sub End If If [Link] = 0 Then MsgBox " arabic" " Exit Sub End If . vbExclamation +
"
: Frm_Add.Show 1 .
. .
***
[Link] [Link] [Link] [Link] For i = 0 To [Link] - 1 [Link] T2!Name [Link] Next i For i = 0 To [Link] - 1 [Link] T3!Name [Link] Next i : Clear_Text Sub Clear_Text() [Link]"" = [Link]"" = [Link]"" = [Link]"" = End Sub
Form_Load
If (KeyAscii > 58 Or KeyAscii < 48) And KeyAscii <> 46 And KeyAscii <> 8 Then KeyAscii = 0 End If : Unload Me . : If [Link] = "" Then MsgBox "! " " Exit Sub End If ( )
SQL = "select * from tb_product where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then MsgBox " " vbExclamation + arabic" Exit Sub End If "
[Link] Dim Num1, Num2 SQL = "select * from tb_category where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( Num1 = T4!Number If T4!View = False Then MsgBox " vbExclamation + "
arabic" " [Link] SQL = "select * from tb_factory where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( Num2 = T4!Number If T4!View = False Then MsgBox " arabic" [Link] " vbExclamation + "
: With T1 . AddNew ! ! ! ! ! ! . Name = [Link] category = Num1 factory = Num2 price = Val([Link]( Count = Val([Link](
End With
. ... "
"
prog9zip
. ( ) . Tag
...
tag=0 . . Frm_Add_2 ) : Case 1 Frm_Add_2.lbl_name" Frm_Add_2.Refresh_Me Frm_Add_2.Show 1 Case 2 Frm_Add_2.lbl_name" Frm_Add_2.Refresh_Me Frm_Add_2.Show 1 ... ( ) .( .
"=
"=
Public Sub Refresh_Me() [Link] If lbl_name.Caption " " = Then If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 [Link] T2!Name [Link] Next i Else If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 [Link] T3!Name [Link] Next i End If End Sub :
If T2!View = False Then [Link] T2!Name " & "( )Else [Link] T2!Name :
If T2!View = False Then [Link] T2!Number & "-" & T2!Name "( ) " & Else [Link] T2!Number & "-" & T2!Name
: Unload Me :
... . .( . . )
* * * * *
Refresh_Me . MyAdd
Sub MyAdd() If [Link] = "" Then MsgBox "! " " Exit Sub End If If lbl_name.Caption "
" = Then
'add category... SQL = "select * from tb_category where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then MsgBox " arabic" " [Link] [Link] = 0
" vbExclamation +
[Link] = Len([Link]( Exit Sub End If [Link] T2!Name = [Link] [Link] Else 'add factory... SQL = "select * from tb_factory where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then MsgBox " " vbExclamation + arabic" " [Link] [Link] = 0 [Link] = Len([Link]( Exit Sub End If [Link] T3!Name = [Link] [Link] End If Refresh_Me [Link]"" = End Sub
:
If [Link] = "" Then MsgBox "! vbExclamation + arabic" Exit Sub End If "
"
: Dim txt Dim i i=1 Do While (Mid([Link], i, 1"" <> (( txt = txt & Mid([Link], i, 1( i=i+1 Loop MsgBox txt ""
. . . :
SQL = "select * from tb_category where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then MsgBox " " vbExclamation + arabic" " [Link] [Link] = 0 [Link] = Len([Link]( Exit Sub End If . T3 T2 . txt If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T2!Number = Val(txt) Then Exit For [Link] Next i
: If [Link] = -1 Then MsgBox " " " Exit Sub End If If [Link] = "" Then MsgBox "! vbExclamation + arabic" Exit Sub End If Dim txt Dim i i=1 Do While (Mid([Link], i, 1"" <> (( txt = txt & Mid([Link], i, 1( i=i+1 Loop If lbl_name.Caption " 'edit category... SQL = "select * from tb_category where name='" & [Link]"'" &
" "
" = Then
Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then MsgBox " " vbExclamation + arabic" " [Link] [Link] = 0 [Link] = Len([Link]( Exit Sub End If If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T2!Number = Val(txt) Then Exit For [Link] Next i [Link] T2!Name = [Link] [Link] Else 'edit factory... SQL = "select * from tb_factory where name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( If [Link] <> 0 Then MsgBox " arabic" " [Link] [Link] = 0 [Link] = Len([Link]( Exit Sub
" vbExclamation +
End If If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T3!Number = Val(txt) Then Exit For [Link] Next i [Link] T3!Name = [Link] [Link] End If Refresh_Me [Link]"" =
. View = False . : Dim sure sure = MsgBox " vbExclamation + vbYesNo + arabic("! If sure = vbNo Then Exit Sub
") "
: If [Link] = -1 Then MsgBox " " " Exit Sub End If Dim sure sure = MsgBox "
"
")
vbExclamation + vbYesNo + arabic("! If sure = vbNo Then Exit Sub Dim txt Dim i i=1 Do While (Mid([Link], i, 1"" <> (( txt = txt & Mid([Link], i, 1( i=i+1 Loop
" = Then
If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T2!Number = Val(txt) Then Exit For [Link] Next i
[Link] T2!View = False [Link] SQL = "select count(*) as mycount from tb_product where category=" & Val(txt"" & ( Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] Else 'delete factory... If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T3!Number = Val(txt) Then Exit For [Link] Next i [Link] T3!View = False [Link] SQL = "select count(*) as mycount from tb_product where factory=" & Val(txt"" & ( Set T4 = [Link](SQL, dbOpenDynaset( If T4!mycount = 0 Then [Link] [Link] End If Refresh_Me [Link]"" =
[Link]
) ) .
* * * * * *
Lable
Ctrl+T (...) :
: . . : ) ( # . )
. .
Refresh_Me
. MaskedEdit
... DTPicker
DTPicker
MDIForm1
Private Sub Operation_Click(Index As Integer( If [Link] = 0 Then MsgBox vbExclamation + arabic" " Exit Sub End If Select Case Index Case 0 Frm_Sel_Bay.lbl_name.Caption" Frm_Sel_Bay.Refresh_Me Frm_Sel_Bay.Show 1 Case 1 Frm_Sel_Bay.lbl_name.Caption" Frm_Sel_Bay.Refresh_Me Frm_Sel_Bay.Show 1 End Select End Sub " "
"=
"=
Refresh_Me
:
Public Sub Refresh_Me() [Link] For i = 0 To [Link] - 1 [Link] T1!Name [Link] Next i
[Link] = 0 Dim Myday, Mymonth, Myyear Myday = Day(Now( If Len(Myday) = 1 Then Myday = 0 & Myday Mymonth = Month(Now( If Len(Mymonth) = 1 Then Mymonth = 0 & Mymonth Myyear = Year(Now( [Link] = Myday & "/" & Mymonth & "/" & Myyear End Sub = DD/MM/YY : . : Long (Day(Now . . . . Unload Me . [Link] Short
If Val([Link]) <= 0 Then MsgBox " " vbExclamation + arabic " Exit Sub End If
"
Buy Sel
.
" = Then
: SEL
. .
Count
[Link] For i = 0 To [Link] - 1 If T1!Name = [Link] Then Exit For [Link] Next i Dim cnt cnt = Val([Link]( If [Link] = True Then cnt = cnt * T1!Box_count
cnt . With T5
. ! ! ! ! !
AddNew product = T1!Number Date = [Link] Count = cnt price = Val([Link]( kind = 1
. Update End With [Link] T1!Count = T1!Count + cnt [Link] . . MsgBox & " : " vbInformation + arabic" " : [Link]"" = [Link]"" = " T1!Count " &
: BUY .
SEL
: cnt
BUY
Sel
[Link] For i = 0 To [Link] - 1 If T1!Name = [Link] Then Exit For [Link] Next i Dim cnt cnt = Val([Link]( If [Link] = True Then cnt = cnt * T1!Box_count : If cnt > T1!Count Then MsgBox & " : Exit Sub End If : With T5 . AddNew ! ! ! ! ! product = T1!Number Date = [Link] Count = cnt price = Val([Link]( kind = 0
" &
[Link] T1!Count = T1!Count - cnt [Link] : MsgBox & " : " vbInformation + arabic" " : [Link]"" = [Link]"" = : ( ) Frm_Show : Frm_Sel_Bay.lbl_name.Caption" "= Frm_Sel_Bay.Refresh_Me Frm_Sel_Bay.[Link] = [Link] Frm_Sel_Bay.Text1 = [Link] Frm_Sel_Bay.Show 1 Refresh_Me u a . Frm_Sel_Bay ) . ( Tb_Sel_Bay *** * " T1!Count " &
) . . ( ) . .
MaskedEdit
Refresh_Me : .!
Form_Load
**
[Link] = 4335 [Link] = 5895 [Link] = (([Link] - [Link]) / 2( [Link] = (([Link] - [Link]) / 2) - 400 [Link] Dim Myday, Mymonth, Myyear Myday = Day(Now( If Len(Myday) = 1 Then Myday = 0 & Myday Mymonth = Month(Now( If Len(Mymonth) = 1 Then Mymonth = 0 & Mymonth Myyear = Year(Now( [Link] = Myday & "/" & Mymonth & "/" & Myyear Refresh_Me
: Refresh_Me . . Flex
If [Link] = True Then SQL = "select count(*) as cnt from tb_sel_bay where kind=0 and date=#" & Format([Link], "mm/dd/yyyy"#" & ("
Else SQL = "select count(*) as cnt from tb_sel_bay where kind=1 and date=#" & Format([Link], "mm/dd/yyyy"#" & (" End If Set T4 = [Link](SQL, dbOpenDynaset( MyCnt = T4!cnt . Genral MyCnt : [Link] [Link] = 6 [Link] = MyCnt + 1 [Link] = 0 [Link] = 0 [Link]"" = [Link] = 1 [Link]" " = [Link] = 2 [Link]" "= [Link] = 3 [Link]" "= [Link] = 4 [Link]" "= [Link] = 5 [Link]" " = [Link](0) = 5 [Link](1) = 5 [Link](2) = 3 [Link](3) = 5
[Link](4) = 5 [Link](5) = 5 [Link](0) = 500 [Link](1) = 500 [Link](2) = 1500 [Link](3) = 1200 . Refresh_Me . T5 Kind
Sub Refresh_Me() Flex Dim Key, n As Integer n=0 If [Link] <> 0 Then [Link] If [Link] = True Then Key = 0 Else Key = 1 End If For i = 0 To [Link] - 1 If T5!kind = Key And Format(T5!Date, "dd/mm/yyyy") = [Link] Then n=n+1 [Link] = n [Link] = 0 [Link] = n [Link] = 1 [Link] = T5!Number [Link] = 2
SQL = "select name from tb_product where number=" & T5!product"" & Set T4 = [Link](SQL, dbOpenDynaset( [Link] = T4!Name [Link] [Link] = 3 [Link] = T5!Date [Link] = 4 [Link] = T5!Count [Link] = 5 [Link] = T5!price End If [Link] Next i End Sub Refresh_Me .( ) ... . . . . Varibale . Public Public Num As Integer . ( . Lable ) .
: If [Link] = 0 Then Exit Sub [Link] = 1 Frm_Edit_SP.Num = [Link] [Link] = 2 Frm_Edit_SP.[Link] = [Link] [Link] = 3 Frm_Edit_SP.[Link] = Format([Link], "dd/mm/yyyy(" [Link] = 4 Frm_Edit_SP.[Link] = [Link] [Link] = 5 Frm_Edit_SP.[Link] = [Link] Frm_Edit_SP.Show 1 Refresh_Me
. : If Val([Link]) <= 0 Then MsgBox " " vbExclamation + arabic " Exit Sub End If
"
If [Link] = 0 Then Exit Sub [Link] For i = 0 To [Link] - 1 If T5!Number = lbl_num.Caption Then Exit For [Link] Next i
. ( : )
If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T1!Number = T5!product Then Exit For [Link] Next i
T5
Buy Sel :
Sub BUY() If Val([Link]) > T1!Count + T5!Count Then MsgBox & " : " Val([Link] " & ( &": T1!Count + T5!Count, " vbExclamation + arabic" Exit Sub End If
[Link] T1!Count = T1!Count + T5!Count T1!Count = T1!Count - Val([Link]( [Link] With T5 . Edit ! ! ! ! ! product = T1!Number Date = [Link] Count = Val([Link]( price = Val([Link]( kind = 0
. Update End With MsgBox & " : " vbInformation + arabic" Unload Me End Sub " " T1!Count " &
Sub SEL() [Link] T1!Count = T1!Count - T5!Count T1!Count = T1!Count + Val([Link]( [Link] With T5 . Edit ! ! ! ! ! product = T1!Number Date = [Link] Count = Val([Link]( price = Val([Link]( kind = 1
. Update End With MsgBox & " : " vbInformation + arabic" Unload Me End Sub " " T1!Count " &
: ... : MSFlexGrid
Mycnt
Sub Clear_Color() For i = 1 To MyCnt For j = 1 To 5 [Link] = i [Link] = j [Link] = QBColor(15( Next j Next i (QBColor(15 : [Link] . Click . : If [Link] = 0 Then Exit Sub Now_Row = [Link] Clear_Color [Link] = Now_Row For i = 1 To 5 [Link] = i [Link] = QBColor(12( Next i *** . .
. Row=0
If [Link] = 0 Then Exit Sub Dim sure sure = MsgBox " ")vbQuestion + vbYesNo + arabic("" If sure = vbNo Then Exit Sub
( ")
: [Link] = 1 If [Link] <> 0 Then [Link] MsgBox [Link] For i = 0 To [Link] - 1 If T5!Number = [Link] Then Exit For [Link] Next i
If sure = vbYes Then If [Link] <> 0 Then [Link] For i = 0 To [Link] - 1 If T1!Number = T5!product Then Exit For [Link] Next i [Link] Select Case T5!kind Case 0 T1!Count = T1!Count + T5!Count Case 1 T1!Count = T1!Count - T5!Count End Select [Link] End If . [Link] . Refresh_Me . : [Link] = 0 . ( ) Refresh_Me Refresh_Me
Frm_Wait Frm_Wait.Show Frm_Wait.[Link] = [Link] Frm_Wait.[Link] = 0 Frm_Wait.[Link] = 0 : Frm_Wait.[Link] = Frm_Wait.[Link] + 1 DoEvents . Frm_Show Unload Frm_Wait
[Link]
(
) . . . . .
* * * * *
"
")vbYesNo +
vbExclamation + arabic(" If sure = vbNo Then Exit Sub sure = MsgBox "
"
")
Index
:
Sub DEL(ByRef Table As Recordset, ByVal msg As String( T1 ) RecordSet . . Table ByVal : Table msg ( ... T2 ByRef
Sub DEL(ByRef Table As Recordset, ByVal msg As String( If [Link] = 0 Then MsgBox " " vbExclamation + arabic " " Exit Sub End If Dim sure sure = MsgBox(msg, vbYesNo + vbExclamation + arabic (" " If sure = vbNo Then Exit Sub [Link] For i = 0 To [Link] - 1 [Link] [Link] Next i MsgBox " " End Sub : . " vbInformation + arabic "
Sub DEL2(ByVal knd As Byte( If [Link] = 0 Then MsgBox " " vbExclamation + arabic " " Exit Sub End If
[Link] For i = 0 To [Link] - 1 If T5!kind = knd Then [Link] [Link] Next i MsgBox " " End Sub : Select Case Index Case 0 DEL T1 " Case 1 DEL T2" Case 2 DEL T3" Case 4 DEL2 0 Case 5 DEL2 1 End Select " vbInformation + arabic "
"
" "
: Array
***
[Link]
: . . Select Case Index Case 0 Frm_User.[Link] = Info(2( Frm_User.[Link] = Info(3( Frm_User.[Link] = Info(4( Frm_NewUser.Show 1 End Select . Frm_User
. . .( ) Key_Press
Unload Me : * . *
"=
[Link] = "0" End If If [Link] = "" Then [Link]" [Link]/vb" [Link] = [Link] & vbNewLine End If "& Hammada2091@[Link]"
"= "&
Edit
Set T4 = [Link]("Tb_User", dbOpenTable( [Link] T4!Name = [Link] T4!Telephone = [Link] T4!More = [Link] [Link]
Info
A1 = InputBox(" " " ") If A1 = "" Then Exit Sub If A1 <> Info(1) Then MsgBox "! " vbCritical + arabic" Exit Sub End If : A1 A1 = InputBox(" " " ")
"
If A1 = "" Then Exit Sub If Len(A1) < 3 Or Len(A1) > 12 Then MsgBox " " vbExclamation + arabic" Exit Sub End If "
: A1
A2
A2 = InputBox(" " " ") If A2 = "" Then Exit Sub If A1 <> A2 Then MsgBox "! " vbCritical + arabic " Exit Sub End If : sure = MsgBox " "
"
")vbYesNo +
vbExclamation + arabic("
[Link]
) .
) . .
. : . * . Frm_Printer
Case 5 If [Link] = 0 Then MsgBox " arabic" " Exit Sub End If Frm_Printer.Show 1
" vbExclamation +
Form_Load
*
*
If [Link] < 0 Then Exit Sub Set Printer = Printers([Link]( Unload Me : Unload Me Printers Printer *
. Index Index
. Array .
True
MDIChild .
Caption . /+
. Caption .=
./ * +: CE . MS
Off .
Index MC .
Locked
First .
. :
If There = True Then There = False [Link]"" = End If [Link] = [Link] & Command1(Index).Caption Calc_Me First True There . Text2 Call Calc_Me There = True First = Val([Link]( [Link] = Command3(Index).Caption Text2 : Text1 Select Case [Link] Case"+" [Link] = First + Val([Link]( Case"" [Link] = First - Val([Link]( Case"*" [Link] = First * Val([Link](
Case"/" [Link] = First / Val([Link]( End Select OverFlow : On Error Resume Next : Err If Err Then MsgBox [Link], vbCritical & " [Link] End If Calc_Me . There=True Call Calc_Me There = True [Link]"" = . Off CE C Select Case Index Case 0 [Link]"" = [Link]"" =
" Err
= Text2
Command5
Case 1 [Link]"" = Case 2 Unload Me End Select : MC MR MS Select Case Index Case 0 Memory = Val([Link]( Case 1 [Link] = Memory There = False Case 2 Memory = 0 End Select
Index . .
Calc_Me
Case 7 Frm_Calc.Width = 3105 Frm_Calc.Height = 2640 Frm_Calc.Top = 0 ' [Link] Frm_Calc.Height Frm_Calc.Left = 0 Frm_Calc.Show
Command1(0).Value = True . +
: Key_Press
If KeyAscii < 58 And KeyAscii >= 48 Then Command1(KeyAscii - 48).Value = True .= Enter C : ElseIf KeyAscii = 46 Then Command1(10).Value = True ElseIf KeyAscii = 13 Then [Link] = True ElseIf KeyAscii = 42 Then Command3(2).Value = True ElseIf KeyAscii = 43 Then Command3(0).Value = True ElseIf KeyAscii = 45 Then Command3(1).Value = True
Esc
ElseIf KeyAscii = 47 Then Command3(3).Value = True ElseIf KeyAscii = 27 Then Command5(1).Value = True Left : ElseIf KeyAscii = 8 Then If Len([Link]) <> 0 Then [Link] = Left([Link], Len([Link]) - 1( .
. BackSpace
[Link]
. Copy_2 : Select Case Index Case 0 Copy_Me Case 1 Copy_2 End Select
Copy_Me
Picture .
( Cancel )
:
[Link] = True :
"=
: [Link] FileName +
. FileTitle : If [Link] = "" Then Exit Sub If Dir([Link]) <> "" Then MsgBox " " vbExclamation + arabic" Exit Sub End If "
: [Link]
Set D1 = [Link](0).OpenDatabase(Folder & "[Link]", False, False, ";pwd=" & PassWord( Set T1 = [Link]("Tb_Product", dbOpenTable( Set T2 = [Link]("Tb_Category", dbOpenTable( Set T3 = [Link]("Tb_Factory", dbOpenTable( Set T5 = [Link]("Tb_Sel_Bay", dbOpenTable( : MsgBox & " : " " "
Copy_Me
"=
If Dir([Link]) <> "" Then MsgBox " " vbExclamation + arabic" Exit Sub End If [Link] FileCopy Folder & "[Link]", [Link] Set D1 = [Link](0).OpenDatabase(Folder & "[Link]", False, False, ";pwd=" & PassWord( Set T1 = [Link]("Tb_Product", dbOpenTable( Set T2 = [Link]("Tb_Category", dbOpenTable( Set T3 = [Link]("Tb_Factory", dbOpenTable( Set T5 = [Link]("Tb_Sel_Bay", dbOpenTable( "
" "
"=
If [Link] = "" Then Exit Sub If Dir([Link]) = "" Then MsgBox " " vbExclamation + arabic " Exit Sub End If
"
")
vbExclamation + arabic +
[Link] SetAttr Folder & "[Link]", vbNormal Kill Folder & "[Link]" FileCopy [Link], Folder & "[Link]" . Start Info . *
Set D1 = [Link](0).OpenDatabase(Folder & "[Link]", False, False, ";pwd=" & PassWord( Set T1 = [Link]("Tb_Product", dbOpenTable( Set T2 = [Link]("Tb_Category", dbOpenTable( Set T3 = [Link]("Tb_Factory", dbOpenTable( Set T5 = [Link]("Tb_Sel_Bay", dbOpenTable( Set T4 = [Link]("Tb_User", dbOpenTable( Info(0) = T4!User_Name Info(1) = T4!PassWord Info(2) = T4!Name Info(3) = T4!Telephone Info(4) = T4!More [Link] Call Start
: MsgBox & " : " " "&( " : Private Sub Copy_2() On Error GoTo 12 [Link] = True [Link]" [Link] If [Link] = "" Then Exit Sub If Dir([Link]) = "" Then MsgBox " " vbExclamation + arabic " Exit Sub End If Dim SuRe SuRe = MsgBox "
"=
"
")
vbExclamation + arabic +
SetAttr Folder & "[Link]", vbNormal Kill Folder & "[Link]" FileCopy [Link], Folder & "[Link]" Set D1 = [Link](0).OpenDatabase(Folder & "[Link]", False, False, ";pwd=" & PassWord( Set T1 = [Link]("Tb_Product", dbOpenTable( Set T2 = [Link]("Tb_Category", dbOpenTable( Set T3 = [Link]("Tb_Factory", dbOpenTable( Set T5 = [Link]("Tb_Sel_Bay", dbOpenTable( Set T4 = [Link]("Tb_User", dbOpenTable( Info(0) = T4!User_Name Info(1) = T4!PassWord Info(2) = T4!Name Info(3) = T4!Telephone Info(4) = T4!More [Link] Call Start MsgBox & " : " : Exit Sub End Sub
[Link]
... .= :
If [Link] = 0 Then MsgBox vbExclamation + arabic" Exit Sub End If Frm_Find.Show " "
Create_Flex : Frm_Show
[Link] = [Link] + 1
"
: On Error Resume Next [Link] = [Link] + 1 If Err = 3420 Then [Link] = 2 End If . : Sub Create_Flex() [Link] [Link] = 8 On Error Resume Next [Link] = [Link] + 1 If Err = 3420 Then [Link] = 2 End If [Link] = 0 [Link] = 0 [Link]"" = [Link] = 1 [Link]" " = [Link] = 2 [Link]" "= [Link] = 3 [Link]" " = [Link] = 4 [Link]" " = [Link] = 5 [Link]" " =
[Link](0) = 5 [Link](1) = 5 [Link](2) = 3 [Link](3) = 5 [Link](4) = 5 [Link](5) = 5 [Link](6) = 5 [Link](7) = 5 [Link](0) = 500 [Link](1) = 500 [Link](2) = 1500 [Link](3) = 1500 [Link](4) = 1500 End Sub
: Combo2 Combo1 [Link]" [Link]" [Link]" [Link]" [Link]" [Link]">" [Link]"<" [Link]"=" [Link] = 0 .< > : Combo1_Click (=) " " " " "
Combo2
If [Link] <> 3 And [Link] <> 4 Then [Link] = 2 [Link] = False Else [Link] = True End If . Refresh_Me : .
Frm_Show : : * *
: SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number" Set T4 = [Link](SQL, dbOpenDynaset( Search : Public Sub Refresh_Me() Call Search Create_Flex If [Link] = 0 Then Exit Sub Frm_Wait.Show Frm_Wait.[Link] = [Link] Frm_Wait.[Link] = 0 Frm_Wait.[Link] = 0 [Link] [Link] Create_Flex If [Link] <> 0 Then [Link] For I = 0 To [Link] - 1 Frm_Wait.[Link] = Frm_Wait.[Link] + 1 DoEvents [Link] = I + 1
[Link] = 1 [Link] = [Link]("tb_product.Number(" [Link] = 2 [Link] = [Link]("tb_product.name(" [Link] = 3 [Link] = [Link]("tb_category.name(" [Link] = 4 [Link] = [Link]("tb_factory.name(" [Link] = 5 [Link] = T4!price [Link] = 6 [Link] = [Link]("Count(" [Link] = 7 [Link] = T4!Box_count [Link] Next I [Link] = 2 [Link] = 7
[Link] = 0 For I = 0 To [Link] - 1 [Link] = I + 1 [Link] = I + 1 Next I End If [Link] Unload Frm_Wait End Sub
. Search Select Combo1 : Select Case [Link] Case 0 Case 1 Case 2 Case 3 Case 4 End Select Set T4 = [Link](SQL, dbOpenDynaset( :
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number" . : Name
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and tb_product.name='" & [Link]"'" &
=tb_product.name . Tb_Product :
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and tb_category.name='" & [Link]"'" & . : Name *
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and tb_factory.name='" & [Link]"'" & < > : (=) Combo2
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and count" & [Link] & Val([Link](
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and price" & [Link] & Val([Link](
[Link]
( )
Index .
. )
Labels .(
. . Index : If [Link] = 0 Then MsgBox vbExclamation + arabic" Exit Sub End If Select Case Index Case 0 Frm_Report1.Show End Select " "
"
Form_Load
[Link] = 4800 [Link] = 6615 [Link] = (([Link] - [Link]) / 2( [Link] = (([Link] - [Link]) / 2) - 40 [Link] : MaskEditBox
Dim Myday, Mymonth, Myyear Myday = Day(Now( If Len(Myday) = 1 Then Myday = 0 & Myday Mymonth = Month(Now( If Len(Mymonth) = 1 Then Mymonth = 0 & Mymonth
Myyear = Year(Now( [Link] = Myday & "/" & Mymonth & "/" & Myyear [Link] = [Link] : [Link] [Link] For i = 0 To [Link] - 1 [Link] T1!Name [Link] Next i Option1 : [Link] = True [Link] = 0 [Link] = True Click Option1 : Private Sub Option1_Click() [Link] = False [Link] = False End Sub
Private Sub Option2_Click() [Link] = True [Link] = True End Sub . CheckBox OptionButton : Genral Dim MyCnt(1( (MyCnt(1 (MyCnt(0 . Command2 ***
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and tb_product.name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset( Lbl_name & " : lbl_cate & " : lbl_fact & " : " = [Link]("tb_product.name(" " = [Link]("tb_category.name(" " = [Link]("tb_factory.name("
Dim num, i num = [Link]("tb_product.Number(" [Link] . ( ... : ) Option1 Kind ... Num :
For i = 0 To 1 If [Link] = True Then SQL = "select * from tb_sel_bay where product=" & num & " and kind=" & i Else SQL = "select * from tb_sel_bay where product=" & num & " and kind=" & i & " and date between#" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY"#" & (" End If Set T4 = [Link](SQL, dbOpenDynaset( . i
: i
MyCnt
Private Sub FlexGrid(r As Integer( MSFlexGrid(r).Clear MSFlexGrid(r).Cols = 5 MSFlexGrid(r).Rows = MyCnt(r) + 1 MSFlexGrid(r).Row = 0 MSFlexGrid(r).Col = 0 MSFlexGrid(r).Text"" = MSFlexGrid(r).Col = 1 MSFlexGrid(r).Text" " = MSFlexGrid(r).Col = 2 MSFlexGrid(r).Text" "= MSFlexGrid(r).Col = 3 MSFlexGrid(r).Text" "= MSFlexGrid(r).Col = 4 MSFlexGrid(r).Text" " = MSFlexGrid(r).ColAlignment(0) = 5 MSFlexGrid(r).ColAlignment(1) = 5 MSFlexGrid(r).ColAlignment(2) = 5 MSFlexGrid(r).ColAlignment(3) = 5 MSFlexGrid(r).ColAlignment(4) = 5
MSFlexGrid(r).ColWidth(0) = 500 MSFlexGrid(r).ColWidth(1) = 500 MSFlexGrid(r).ColWidth(3) = 1200 End Sub : FlexGrid (i( : Private Sub Put_Data(r As Integer( n=0 With MSFlexGrid(r( For i = 0 To [Link] - 1 n=n+1 . Row = n . . . . . . . . . . Col = 0 Text = n Col = 1 Text = T4!Number Col = 2 Text = T4!Date Col = 3 Text = T4!Count Col = 4 Put_Data
: Put_Data (i( [Link] Next i : Private Sub Command1_Click() Unload Me End Sub
[Link]
. :
Combo MDIChild
Label . True .
MSFlexGrid Unload Me
.( )
Frm_Report3 Frm_Report2
.
Form_Load
:
[Link] = 4800 [Link] = 3600 [Link] = (([Link] - [Link]) / 2( [Link] = (([Link] - [Link]) / 2) - 40 [Link] [Link] [Link] For i = 0 To [Link] - 1 [Link] T2!Name [Link] Next i [Link] = 0 . T2 : T3 Flex ( )
Private Sub Flex() [Link] [Link] = 6 [Link] = [Link] + 1 [Link] = 0 [Link] = 0 [Link]"" = [Link] = 1 [Link]" " =
[Link] = 2 [Link]" [Link] = 3 [Link]" " = [Link] = 4 [Link]" " = [Link] = 5 [Link]" " =
"=
[Link](0) = 5 [Link](1) = 5 [Link](2) = 3 [Link](3) = 5 [Link](4) = 5 [Link](5) = 5 [Link](0) = 500 [Link](1) = 500 [Link](2) = 1500 [Link](3) = 1500 End Sub
:
Combo1_Click
.
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number and tb_factory.name='" & [Link]"'" & Set T4 = [Link](SQL, dbOpenDynaset(
. :
Tb_Category
Tb_Factory.name
If [Link] = 0 Then Lbl_name & " : " = [Link] lbl_cnt & " : lbl_sta" Flex Exit Sub End If : "= " = [Link]
Flex
. :
[Link] [Link] : Lbl_name & " : lbl_cnt & " : ... " = [Link] " = [Link]
If [Link]("tb_category.view") = False Then lbl_sta" : "= Else lbl_sta" End If Flex : "=
) (
) .
...
For i = 0 To [Link] - 1 Frm_Wait.[Link] = Frm_Wait.[Link] + 1 DoEvents [Link] = i + 1 [Link] = 1 [Link] = [Link]("tb_product.Number(" [Link] = 2 [Link] = [Link]("tb_product.name(" [Link] = 3 [Link] = [Link]("tb_category.name(" [Link] = 4 [Link] = T4!price [Link] = 5 [Link] = [Link]("Count(" [Link] Next i
Sort
[Link]
.. .
...
. : . Ctrl+T
(Microsoft Chart Control 6.0(OLEDB . ) . .( ) . RowCount . ) .( . (Total(3 : . NULL . Column . ColumnCount=4 ( ... X,Y Column Row Row : Charttype VtchChartType2dPie
If [Link] = True Then SQL = "select sum(count) as sum1,count(product) as cnt from tb_sel_bay where kind=0" Else SQL = "select sum(count) as sum1,count(product) as cnt from tb_sel_bay where kind=0 " & " and date between#" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY (" "# " & End If Set T4 = [Link](SQL, dbOpenDynaset( If T4!cnt <> 0 Then Total(0) = T4!sum1 End If [Link] . : Null
Kind
If [Link] = True Then SQL = "select sum(count) as sum1,count(product) as cnt from tb_sel_bay where kind=1" Else SQL = "select sum(count) as sum1,count(product) as cnt from tb_sel_bay where kind=1 " & " and date between#" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY (" "# " & End If Set T4 = [Link](SQL, dbOpenDynaset( If T4!cnt <> 0 Then Total(1) = T4!sum1 End If [Link]
Index :
Dim str(3) As String str(0" " = ( str(1" str(2" str(3" " = ( " = ( " = ( : [Link] = 4 [Link] = 1
Date : ColumnLabel For i = 1 To 4 [Link] = i [Link] = Total(i - 1( [Link] = str(i - 1( Next i Column
[Link]
. . MaskEdBox1 :
.
Labels
:
.
. MDIChild=True .
[Link] = 4800 [Link] = 4905 [Link] = (([Link] - [Link]) / 2( [Link] = (([Link] - [Link]) / 2) - 40 [Link] : Dim Myday, Mymonth, Myyear Myday = Day(Now( If Len(Myday) = 1 Then Myday = 0 & Myday Mymonth = Month(Now( If Len(Mymonth) = 1 Then Mymonth = 0 & Mymonth Myyear = Year(Now( [Link] = Myday & "/" & Mymonth & "/" & Myyear
: [Link] = True
:
Function WeekDay
WeekDay : (
)
x = Weekday(x, vbSaturday( : Select Case x Case 1 dayname" "= Case 2 dayname" " = Case 3 dayname" "= Case 4 dayname" Case 5 dayname" Case 6 dayname" Case 7 daynmae" End Select "= "= "= "=
.( : Genral
) Labels
Command2
: a1 = 0: a2 = 0: a3 = 0: a4 = 0 :
SQL = "select sum(price) as prc,count(*) as cnt from tb_sel_bay where kind=0 and date=#" & Format([Link], "MM/DD/YYYY"#" & (" Set T4 = [Link](SQL, dbOpenDynaset( If T4!cnt <> 0 Then a1 = T4!cnt a2 = T4!prc End If [Link] SQL = "select sum(price) as prc,count(*) as cnt from tb_sel_bay where kind=1 and date=#" & Format([Link], "MM/DD/YYYY"#" & (" Set T4 = [Link](SQL, dbOpenDynaset( If T4!cnt <> 0 Then a3 = T4!cnt a4 = T4!prc End If [Link]
: Flex1 Flex2 : Private Sub Flex1() [Link] [Link] = 5 [Link] = a1 + 1 [Link] = 0 [Link] = 0 [Link]"" = [Link] = 1 [Link]" " = [Link] = 2 [Link]" "= [Link] = 3 [Link]" "= [Link] = 4 [Link]" " = [Link](0) = 5
[Link](1) = 5 [Link](2) = 5 [Link](3) = 5 [Link](4) = 5 [Link](0) = 500 [Link](1) = 500 [Link](2) = 1500 [Link](3) = 1200 End Sub
Private Sub Flex2() [Link] [Link] = 5 [Link] = a3 + 1 [Link] = 0 [Link] = 0 [Link]"" = [Link] = 1 [Link]" " = [Link] = 2 [Link]" "=
[Link] = 3 [Link]" "= [Link] = 4 [Link]" " = [Link](0) = 5 [Link](1) = 5 [Link](2) = 5 [Link](3) = 5 [Link](4) = 5
[Link](0) = 500 [Link](1) = 500 [Link](2) = 1500 [Link](3) = 1200 End Sub
: Put_Data2 Put_Data1
SQL = "select * from tb_sel_bay where kind=0 and date=#" & Format([Link], "MM/DD/YYYY & (" "#" Set T4 = [Link](SQL, dbOpenDynaset( Put_Data1 [Link] SQL = "select * from tb_sel_bay where kind=1 and date=#" & Format([Link], "MM/DD/YYYY & (" "#" Set T4 = [Link](SQL, dbOpenDynaset( Put_Data2 [Link]
T6
Put_Data :
Public T6 As Recordset
Private Sub Put_Data1() n=0 If [Link] <> 0 Then [Link] [Link] End If With MSFlexGrid1 For i = 0 To [Link] - 1 n=n+1 . Row = n . . . . . Col = 0 Text = n Col = 1 Text = T4!Number Col = 2
SQL = "select name from tb_product where number=" & T4!product Set T6 = [Link](SQL, dbOpenDynaset( . Text = T6!Name [Link] . Col = 3 Text = T4!Count Col = 4 . .
. . : Label2 Visible=False . : Frm_Report4 .( : Case 0 Unload Frm_Report4 Frm_Report4.Show Case 1 Unload Frm_Report4 Frm_Report4.Show Frm_Report4.[Link] = True Frm_Report4.[Link] = True Frm_Report4.[Link] = 120 Frm_Report4.[Link] = True Command2 ) : ( : )
MaskEdBox2
: Form_Load :
[Link] = [Link] :( : : ) : *
If [Link] = False Then x = dayname([Link]( Lbl_day.Caption & " : "=x Else Lbl_day.Caption" "&": End If : Between
"=
If [Link] = False Then SQL = "select sum(price) as prc,count(*) as cnt from tb_sel_bay where kind=0 and date=#" & Format([Link], "MM/DD/YYYY"#" & (" Else SQL = "select sum(price) as prc,count(*) as cnt from tb_sel_bay where kind=0 and date between #" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY"#" & (" End If . : Between *
SQL = "select * from tb_sel_bay where kind=0 and date=#" & Format([Link], "MM/DD/YYYY & (" "#" Else SQL = "select * from tb_sel_bay where kind=0 and date between #" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY (" "# " & End If . . Flex2 Flex1 : Flex1 If [Link] = True Then [Link] = 6 [Link] = 5 [Link]" "= [Link](5) = 1200 [Link](5) = 5 End If . Flex2 : Put_Data2 Put_Data1 For i = 0 To [Link] - 1 n=n+1 . Row = n : :
. . . . .
Col = 2 SQL = "select name from tb_product where number=" & T4!product Set T6 = [Link](SQL, dbOpenDynaset( Text = T6!Name
If [Link] = True Then . Col = 5 Text = T4!Date End If [Link] Next i . Put_Data2 : .
If [Link] = 0 Then MsgBox vbExclamation + arabic" " Exit Sub End If " "
"
Select Case Index Case 0 Unload Frm_Report4 Frm_Report4.Show Case 1 Unload Frm_Report4 Frm_Report4.Show Frm_Report4.[Link] = True Frm_Report4.[Link] = True Frm_Report4.[Link] = 120 Frm_Report4.[Link] = True Case 3 End Select
[Link]
DataReport . . . DataReport
DataRreport . DataReport : Report Header : Page Header : Detailes : Page Footer Tab : : Pointer . : RptLabel . . . Line . : RptImage LoadPicture : RptLine : RptShape : RptFunction . : RptText : Report Footer Add
: . . . . .
. .
.
. . : DataReport
Rptlable
[Link]("Section2").Controls("l1").Caption = Lbl_name . . : ) . DataFields fullname : . . D p Set [Link] = Rs P RptLable T . RptFunction RptText FucntionType . : : RptTextBox DataFields DataMember ( :
Caption
Microsoft Access ActiveX Data Object 2.5 Library Ado : Dim cn As [Link] Dim Rs As [Link] Set cn = New [Link] Set Rs = New [Link] : Connection String
[Link] "Provider=[Link].4.0;" & "Data Source=" & Folder & "[Link];" & "Jet OLEDB:Database Password=" & PassWord" : Connection String msdn
String
rs :
rs
DataReport
sql = "select * from table1" Set Rs = [Link](sql( Set [Link] = Rs : [Link] : [Link] True
Add
Caption
. RptLabel
. Caption RptTextBox
.
(
) .
RptLabel .
. :
BorderStyle BackStyle
:
.
Dim cn As [Link] Dim Rs As [Link] Set cn = New [Link] Set Rs = New [Link] :
[Link] "Provider=[Link].4.0;" & "Data Source=" & Folder & "[Link];" & "Jet OLEDB:Database Password=" & PassWord
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number" Set Rs = [Link](SQL( Set [Link] = Rs : [Link]("Section2").Controls("label3").Capti (on = Info(2 [Link]("Section2").Controls("label4").Capti on & " : " = Info(3( : [Link] Set cn = Nothing Set Rs = Nothing . . . : . : Number - Date - Count - Price Kind Frm_Report1
l5
l1
RptLabel
(Command3(1 : (Command3(0
Dim cn As [Link] Dim Rs As [Link] Set cn = New [Link] [Link] "Provider=[Link].4.0;" & "Data Source=" & Folder & "[Link];" & "Jet OLEDB:Database Password=" & PassWord Set Rs = New [Link]
:
Index
Kind
Set Rs = [Link](sql_now & " and kind=" & Index( Set [Link] = Rs
If [Link] = True Then sql = "select * from tb_sel_bay where product=" & num & " and kind=" & i sql_now = "select * from tb_sel_bay where product=" & num Else sql = "select * from tb_sel_bay where product=" & num & " and kind=" & i & " and date between#" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY"#" & (" sql_now = "select * from tb_sel_bay where product=" & num & " and date between#" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY"#" & (" End If . : sql_now
[Link]("Section2").Controls("l1").Caption = Lbl_name [Link]("Section2").Controls("l2").Caption = lbl_cate [Link]("Section2").Controls("l3").Caption = lbl_fact [Link]("Section2").Controls("l4").Caption = lbl_prc [Link]("Section2").Controls("l5").Caption = lbl_cnt Select Case Index Case 0
[Link]("Section2").Controls("label1").Capti on" "= End Select [Link]("Section2").Controls("label3").Capti on = Info(2( [Link]("Section2").Controls("label4").Capti on & " : " = Info(3( [Link] Set cn = Nothing Set Rs = Nothing
.
: * * * * * dt2 dt1 . . . .
.
sql_now typ :
If [Link] = False Then SQL = "select * from tb_sel_bay where kind=0 and date=#" & Format([Link], "MM/DD/YYYY & (" "#" Else SQL = "select * from tb_sel_bay where kind=0 and date between #" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY (" "# " & End If
If [Link] = False Then SQL = "select * from tb_sel_bay where kind=0 and date=#" & Format([Link], "MM/DD/YYYY & (" "#" sql_now = "select tb_sel_bay.*,tb_product.* from tb_sel_bay,tb_product where date=#" & Format([Link], "MM/DD/YYYY") & "# and tb_product.number = tb_sel_bay.product" dt1 = [Link] typ = 0 Else SQL = "select * from tb_sel_bay where kind=0 and date between #" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY (" "# " & sql_now = "select tb_sel_bay.*,tb_product.* from tb_sel_bay,tb_product where date between #" & Format([Link], "MM/DD/YYYY") & "# and #" & Format([Link], "MM/DD/YYYY") & "# and tb_product.number = tb_sel_bay.product" dt1 = [Link] dt2 = [Link] typ = 1 End If
Private Sub Command3_Click(Index As Integer( Dim cn As [Link] Dim Rs As [Link] Set cn = New [Link]
[Link] "Provider=[Link].4.0;" & "Data Source=" & Folder & "[Link];" & "Jet OLEDB:Database Password=" & PassWord Set Rs = New [Link] Set Rs = [Link](sql_now & " and kind=" & Index( Set [Link] = Rs [Link]("Section2").Controls("l1").Caption = Lbl_day [Link]("Section2").Controls("l2").Caption = lbl_cnt1 [Link]("Section2").Controls("l3").Caption = lbl_cnt2 [Link]("Section2").Controls("l4").Caption = lbl_prc1 [Link]("Section2").Controls("l5").Caption = lbl_prc2 Select Case Index Case 0 If typ = 0 Then
[Link]("Section2").Controls("label1").Capti on & " " = dt1 & " " & dt2 End If Case 1 If typ = 0 Then
[Link]("Section2").Controls("label1").Capti on & " " = dt1 & " " & dt2 End If End Select [Link]("Section2").Controls("label3").Capti on = Info(2( [Link]("Section2").Controls("label4").Capti on & " : " = Info(3( [Link] Set cn = Nothing Set Rs = Nothing End Sub . . : : ... Sql_now Search . a1,a2,a3 .
If sql_now = "" Then Exit Sub Dim cn As [Link] Dim Rs As [Link] Set cn = New [Link] [Link] "Provider=[Link].4.0;" & "Data Source=" & Folder & "[Link];" & "Jet OLEDB:Database Password=" & PassWord Set Rs = New [Link] Set Rs = [Link](sql_now( Set [Link] = Rs
[Link]("Section2").Controls("label3").Capti on = Info(2( [Link]("Section2").Controls("label4").Capti on & " : " = Info(3( [Link]("Section2").Controls("label1").Capti on & " ) " = a1 & a2 & a3"( " &
[Link]
exe Setup
...
.
Remove Panel Insert Panel : . . . . : text : Text : Alignment : Style : Beval : AutoSize
Text
. . . Style
: :
* *
. . Key . . . .( : Private Sub StatusBar1_PanelClick(ByVal Panel As [Link]( Select Case Left(Panel, 5( Case" " Refresh_St Case" " If [Link] = 0 Then MsgBox vbExclamation + arabic" Exit Sub End If Unload Frm_Report4 Frm_Report4.Show Case" " Frm_Calc.Width = 3105 Frm_Calc.Height = 2640 Frm_Calc.Top = 0 Frm_Calc.Left = 0 Frm_Calc.Show
* *
* * *
"
"
"
Case" " If [Link] = 0 Then MsgBox " vbExclamation + arabic" Exit Sub End If Frm_Find.Show Frm_Find.[Link] = 0 Frm_Find.[Link] = 3 Frm_Find.[Link] = 2 Frm_Find.[Link] = True Case "Hamma" "
"
: Private Sub Refresh_St() SQL = "select count(*) as cnt from tb_product" Set T4 = [Link](SQL, dbOpenDynaset( [Link](3).Text & " " = T4!cnt" "& [Link] SQL = "select count(*) as cnt from tb_product where count=0" Set T4 = [Link](SQL, dbOpenDynaset( [Link](4).Text & " [Link] End Sub " = T4!cnt"
"&
Index
: :
***
* *
. * * * * * * * * * * *
Custom :
Imagelist Image . . . Custom : ... Toolbar : Image List * . : : Style Appearance * : TextAligment * Buttons * * . Insert Picture
. Imagelist1 .
Caption . . .
. :
:
Button Select
Private Sub Toolbar1_ButtonClick(ByVal Button As [Link]( Select Case Button Case" " Dim sure sure = MsgBox " ")vbExclamation +
vbYesNo + arabic(" " If sure = vbYes Then End Case" " [Link] 1 Case" " Call Chng_pass Case" " Copy_Me Case" " Frm_Calc.Width = 3105 Frm_Calc.Height = 2640 Frm_Calc.Top = 0 Frm_Calc.Left = 0
Frm_Calc.Show Case" " If [Link] = 0 Then MsgBox vbExclamation + arabic" Exit Sub End If Frm_Find.Show Case" " If [Link] = 0 Then MsgBox " vbExclamation + arabic" Exit Sub End If Frm_Sel_Bay.Lbl_name.Caption" Frm_Sel_Bay.Refresh_Me Frm_Sel_Bay.Show 1 Case" " If [Link] = 0 Then MsgBox vbExclamation + arabic" " Exit Sub End If Frm_Sel_Bay.Lbl_name.Caption" Frm_Sel_Bay.Refresh_Me Frm_Sel_Bay.Show 1 Case" " If [Link] = 0 Then MsgBox " vbExclamation + arabic" Exit Sub End If Unload Frm_Report4
" "
"
" "
"=
"
"
"=
"
"
Frm_Report4.Show Case" " If [Link] = 0 Then MsgBox " vbExclamation + arabic" Exit Sub End If " "
Frm_Report1.Show Case" " If [Link] = 0 Then MsgBox " vbExclamation + arabic" Exit Sub End If " "
***
[Link]
.
Frm_Edit_SP ***
>
. :
.( :
) .
a(x) = [Link] If a(x " " = (Then a(x) = "[Link]" ' ' . ' b(x) = [Link] c(x) = [Link] X=X+1 Sql :
SQL = "select tb_product.*,tb_category.*,tb_factory.* from tb_product,tb_factory,tb_category where tb_product.category=tb_category.number and tb_product.factory=tb_factory.number" For i = 0 To X-1 sql = sql & " and " & a(x) & b(x) & c(x( Next i . . . : . . * *
: a a .( if a="" then a = Number else a = a & "," & Number end if . : Split b = split(a(" " : for i = 0 to UPBount(b( ' ' : List . a ( Number ) )
.
.
Sql
.
: . *
. True,false ...
String
. .
. . : . . Start Word
.
: . . ( ) . .
True-False
. . . . . . . . . .
[Link]
. .
...
exe . ) . Rivision Minor ,, Major . . ) . Visual Basic 6 Visual Basic 5 Winzip 8.1 Winzip 8 Make [Link]
File ( Option .
(
.
Compile Option
. Compile To NativeCode Compile To P_Code Compile To P_Code . P_Code Compile To NativeCode Create Sympolic Optimize for ast Code No Optimize (Favor Pentium Pro(tm ( ) Debug Info . ... Optimize for Small Code
: Advanced Optimizations Optimization Index : : Assume No Aliasing . Aliasing : Remove Array Bound Check .
: Remove Floating Point Error Checks . ^ * . ^ * . FDIV FDIV : : Allow Unrounded Floating Point Operations : Remove Safe Pentium(TM) FDIV Checks
[Link]
.
OK exe .
. Compile
Setup
Exe . . Package & Deployment Wizerd . Microsoft Visual Basic 6.0 Browse . Package exe exe . Setup
Package
Compiling
. None
...
:
* * *
ocx
* * *
. Next
"
Fonts
. Install
install
Engine .
Compiling net.
Licence
[autorun] open=[Link]
. [Link] .
. - :