VERSION 5.00 Begin VB.Form Form34 BorderStyle = 4 'Fixed ToolWindow Caption = "Add Filter" ClientHeight = 1575 ClientLeft = 45 ClientTop = 300 ClientWidth = 6390 LinkTopic = "Form34" MaxButton = 0 'False MDIChild = -1 'True MinButton = 0 'False ScaleHeight = 1575 ScaleWidth = 6390 ShowInTaskbar = 0 'False Begin VB.CommandButton Command3 Caption = "CANCEL" BeginProperty Font Name = "Arial" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 2520 TabIndex = 10 Top = 1080 Width = 1815 End Begin VB.CommandButton Command2 Caption = "OK (SpaceBar)" BeginProperty Font Name = "Arial" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 4440 TabIndex = 1 Top = 1080 Width = 1815 End Begin VB.Frame Frame3 Caption = "VALUE" Height = 855 Left = 4320 TabIndex = 3 Top = 120 Width = 1935 Begin VB.TextBox Text1 Height = 285 Left = 240 TabIndex = 4 Text = "nd" Top = 360 Width = 1455 End End Begin VB.Frame Frame2 Caption = "OPERATION" Height = 855 Left = 2280 TabIndex = 2 Top = 120 Width = 1935 Begin VB.OptionButton Option1 Caption = "=" Height = 255 Index = 2 Left = 1320 TabIndex = 7 Top = 360 Width = 375 End Begin VB.OptionButton Option1 Caption = "<" Height = 255 Index = 1 Left = 720 TabIndex = 6 Top = 360 Width = 375 End Begin VB.OptionButton Option1 Caption = ">" Height = 255 Index = 0 Left = 120 TabIndex = 5 Top = 360 Value = -1 'True Width = 375 End Begin VB.Line Line1 Index = 1 X1 = 1200 X2 = 1200 Y1 = 240 Y2 = 720 End Begin VB.Line Line1 Index = 0 X1 = 600 X2 = 600 Y1 = 240 Y2 = 720 End End Begin VB.Frame Frame1 Caption = "ELEMENT" Height = 855 Left = 0 TabIndex = 0 Top = 120 Width = 2175 Begin VB.CommandButton Command1 Caption = "..." Height = 250 Left = 45 TabIndex = 9 Top = 390 Width = 375 End Begin VB.ComboBox Combo1 Height = 315 Left = 480 TabIndex = 8 Text = "select" Top = 360 Width = 1455 End End End Attribute VB_Name = "Form34" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 32 Then Command2_Click End If End Sub Private Sub Command1_Click() Form34.Command2.SetFocus FormSelezionato = "FILTERING" INP.MostraForm13 Form34.left, Form34.top End Sub Private Sub Command2_Click() If FilSelect = 0 Then For i = 1 To NumElem1 If Elementi(i) = Combo1.Text Then GoTo poit End If Next i Exit Sub poit: NumFilter = NumFilter + 1 For i = 0 To 2 If Option1(i).Value = True Then FiltOp(NumFilter) = i + 1 End If Next i FiltVal(NumFilter) = Val(Text1.Text) FiltElem(NumFilter) = Combo1.Text Form29.Label4(NumFilter - 1).Caption = FiltElem(NumFilter) If FiltOp(NumFilter) = 1 Then Form29.Label5(NumFilter - 1).Caption = ">" End If If FiltOp(NumFilter) = 2 Then Form29.Label5(NumFilter - 1).Caption = "<" End If If FiltOp(NumFilter) = 3 Then Form29.Label5(NumFilter - 1).Caption = "=" End If Form29.Label6(NumFilter - 1).Caption = FiltVal(NumFilter) Form29.Label4(NumFilter - 1).Visible = True Form29.Label5(NumFilter - 1).Visible = True Form29.Label6(NumFilter - 1).Visible = True End If If FilSelect <> 0 Then For i = 0 To 2 If Option1(i).Value = True Then FiltOp(FilSelect) = i + 1 End If Next i FiltVal(FilSelect) = Val(Text1.Text) FiltElem(FilSelect) = Combo1.Text Form29.Label4(FilSelect - 1).Caption = FiltElem(FilSelect) If FiltOp(FilSelect) = 1 Then Form29.Label5(FilSelect - 1).Caption = ">" End If If FiltOp(FilSelect) = 2 Then Form29.Label5(FilSelect - 1).Caption = "<" End If If FiltOp(FilSelect) = 3 Then Form29.Label5(FilSelect - 1).Caption = "=" End If Form29.Label6(FilSelect - 1).Caption = FiltVal(FilSelect) Form29.Label4(FilSelect - 1).Visible = True Form29.Label5(FilSelect - 1).Visible = True Form29.Label6(FilSelect - 1).Visible = True End If aaaaa = 0 For i = 1 To Numelem If Combo1.Text = Elementi(i) Then aaaaa = 1 End If Next i If aaaaa = 0 Then Exit Sub End If Form34.Hide Form29.Show Form29.SetFocus End Sub Private Sub Command3_Click() Form34.Hide Form29.Show Form29.SetFocus End Sub Private Sub Option1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) If KeyCode = 32 Then Command2_Click End If End Sub Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 32 Then Command2_Click End If End Sub