📄 form5.frm
字号:
EndProperty
BeginProperty Column02
DataField = "ITEM"
Caption = "Item"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "model"
Caption = "Brand / Model"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "Price"
Caption = "Price"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "MRP"
Caption = "MRP"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "OB"
Caption = "Open. Balance"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "Location"
Caption = "Location"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "Manu"
Caption = "Manufecturer"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column09
DataField = "ISSUEd"
Caption = "Whethere Issued"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 975.118
EndProperty
BeginProperty Column01
ColumnWidth = 1214.929
EndProperty
BeginProperty Column02
ColumnWidth = 1094.74
EndProperty
BeginProperty Column03
ColumnWidth = 1244.976
EndProperty
BeginProperty Column04
ColumnWidth = 900.284
EndProperty
BeginProperty Column05
ColumnWidth = 810.142
EndProperty
BeginProperty Column06
ColumnWidth = 1154.835
EndProperty
BeginProperty Column07
ColumnWidth = 1739.906
EndProperty
BeginProperty Column08
ColumnWidth = 1739.906
EndProperty
BeginProperty Column09
Object.Visible = 0 'False
ColumnWidth = 764.787
EndProperty
EndProperty
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'COMBO1--->CATEGORY
'COMBO2--->ITEM
'COMBO3--->GROUP HEAD
'COMBO4--->MODEL
'COMBO5--->LOCATION
'COMMAND1->OK BUTTON
'COMMAND2->CANCEL BUTTON
Dim s As String
Private Sub Combo1_Click() 'Group Head Combo Click
Combo3.Enabled = True
If Combo1.Text = "CONSUMEABLE" Then
s = "Select distinct g_head from stock"
Else
s = "Select distinct g_head from stock"
End If
'--------To copy Relevent Items of select Group Heads
Adodc1.RecordSource = s
Adodc1.Refresh
Combo3.Clear
Combo3.AddItem "ALL"
While Adodc1.Recordset.EOF = False
Combo3.AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Wend
'-----------------------------------------------------
End Sub
Private Sub Combo2_Click() 'Item Combo Click
If Combo2.Text <> "ALL" Then
Combo4.Enabled = True
If Combo1.Text = "CONSUMEABLE" Then
s = "Select distinct model from stock WHERE g_head = '" + Combo3.Text + "'"
ss = "Select distinct location from stock WHERE g_head = '" + Combo3.Text + "'"
Else
s = "Select distinct model from stock WHERE g_head = '" + Combo3.Text + "'"
ss = "Select distinct location from stock WHERE g_head = '" + Combo3.Text + "'"
End If
s = s + " and item = '" + Combo2.Text + "'"
ss = ss + " and item = '" + Combo2.Text + "'"
'--------To copy Relevent Model Details of selected Item
Adodc1.RecordSource = s
Adodc1.Refresh
Combo4.Clear
Combo4.AddItem "ALL"
While Adodc1.Recordset.EOF = False
Combo4.AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Wend
'--------To copy Relevent Locations of selected Item
Adodc1.RecordSource = ss
Adodc1.Refresh
Combo5.Clear
Combo5.AddItem "ANY WHERE"
While Adodc1.Recordset.EOF = False
Combo5.AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Wend
Combo5.Text = "ANY WHERE"
Else 'If You Have selected ALL ITEMS
Combo4.Enabled = False
Combo4.Text = ""
End If
Combo5.Text = "ANY WHERE"
End Sub
Private Sub Combo3_Click() 'Model Combo Click
Dim ss As String
If Combo3.Text <> "ALL" Then
Combo2.Enabled = True
If Combo1.Text = "CONSUMEABLE" Then
If Combo3.Text = "ALL" Then
s = "Select distinct item from stock"
Else
s = "Select distinct item from stock WHERE g_head = '" + Combo3.Text + "'"
End If
Else
If Combo3.Text = "ALL" Then
s = "Select distinct item from stock"
Else
s = "Select distinct item from stock WHERE g_head = '" + Combo3.Text + "'"
End If
End If
Adodc1.RecordSource = s
Adodc1.Refresh
Combo2.Clear
Combo2.AddItem "ALL"
While Adodc1.Recordset.EOF = False
Combo2.AddItem Adodc1.Recordset.Fields(0)
Adodc1.Recordset.MoveNext
Wend
Else
Combo2.Enabled = False
Combo2.Text = ""
Combo4.Enabled = False
Combo4.Text = ""
End If
End Sub
Private Sub Command1_Click() 'When OK Button Clicked
'On Error Resume Next
If Combo1.Text = "CONSUMEABLE" Then
If Combo3.Text <> "ALL" Then
s = "SELECT * FROM stock WHERE g_head = '" + UCase(Combo3.Text) + "'"
Else
s = "SELECT * FROM stock"
End If
If Combo2.Text <> "ALL" And Combo3.Text <> "ALL" Then
If Combo4.Text <> "ALL" Then
s = s + " AND item = '" + Combo2.Text + "' and model = '" + Combo4.Text + "'"
Else
s = s + " AND item = '" + Combo2.Text + "'"
End If
Else
s = s
End If
Else
If Combo3.Text <> "ALL" Then
s = "SELECT * FROM stock WHERE g_head = '" + UCase(Combo3.Text) + "'"
Else
s = "SELECT * FROM stock"
End If
If Combo2.Text <> "ALL" And Combo3.Text <> "ALL" Then
If Combo4.Text <> "ALL" Then
s = s + " AND item = '" + Combo2.Text + "' and model = '" + Combo4.Text + "'"
Else
s = s + " AND item = '" + Combo2.Text + "'"
End If
Else
s = s
End If
End If
s = s + " order by item_code"
Adodc1.RecordSource = s
Adodc1.Refresh
DataGrid1.Refresh
End Sub
Private Sub Command2_Click() 'CANCLE CLICK
Unload Me
MAIN.Enabled = True
MAIN.Show
End Sub
Private Sub Form_activate()
'Call Command1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -