⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbcx1.frm

📁 这个就不用多说了
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Strikethrough   =   0   'False
         EndProperty
         Height          =   345
         Left            =   1320
         TabIndex        =   3
         Top             =   840
         Width           =   2415
      End
      Begin VB.ComboBox Combo2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1320
         TabIndex        =   2
         Top             =   1320
         Width           =   2415
      End
      Begin VB.ComboBox Combo3 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1290
         TabIndex        =   1
         Top             =   1710
         Width           =   6300
      End
      Begin VB.Label Label12 
         Caption         =   "使用情况"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4020
         TabIndex        =   30
         Top             =   345
         Width           =   855
      End
      Begin VB.Label Label6 
         Caption         =   "所有卡片"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   360
         TabIndex        =   29
         Top             =   2160
         Width           =   855
      End
      Begin VB.Label Label9 
         Caption         =   "已减少的卡片"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2760
         TabIndex        =   28
         Top             =   2160
         Width           =   1335
      End
      Begin VB.Label Label10 
         Caption         =   "现存卡片"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   5520
         TabIndex        =   27
         Top             =   2160
         Width           =   1095
      End
      Begin VB.Label Label7 
         Caption         =   "减少方式"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3960
         TabIndex        =   12
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4080
         TabIndex        =   10
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "卡片类别"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   8
         Top             =   360
         Width           =   2055
      End
      Begin VB.Label Label2 
         Caption         =   "名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   840
         Width           =   2055
      End
      Begin VB.Label Label3 
         Caption         =   "购入方式"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   6
         Top             =   1320
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "所属单位"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   165
         TabIndex        =   5
         Top             =   1725
         Width           =   975
      End
   End
End
Attribute VB_Name = "Bbcx1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim myclass As New Bb
Public sql As String

Private Sub Command1_Click()
Dim txt As String
sql = " SELECT dbo.GyzcCare.BH AS 卡片编号, dbo.GyzcCare.Name AS 名称," & _
      "dbo.GyzcCode.Name AS 类别, dbo.DwBmCode.Name AS 所属单位," & _
      "dbo.GyzcCare.Je AS 金额, dbo.AddMode.Name AS 增加方式, dbo.UseState.name 使用情况," & _
      "dbo.GyzcCare.CzFlag AS 状态, dbo.GyzcCare.GG AS 规格, dbo.GyzcCare.sl AS 数量," & _
     " dbo.GyzcCare.GzZq AS 增加日期 ,dbo.GyzcCare.jzyear AS 已使用年,dbo.GyzcCare.jzmonth AS 已使用月," & _
      "dbo.GyzcCare.Bz AS 备注, dbo.LessMode.Name AS 减少方式, " & _
     " dbo.GyzcCare.YsZq AS 减少日期 FROM dbo.DwBmCode INNER JOIN dbo.GyzcCode INNER JOIN " & _
     " dbo.GyzcCare ON dbo.GyzcCode.Bm = dbo.GyzcCare.CodeId ON" & _
     " dbo.DwBmCode.Bm = dbo.GyzcCare.DwbmId INNER JOIN" & _
     " dbo.AddMode ON dbo.GyzcCare.Mode = dbo.AddMode.ID INNER JOIN dbo.UseState ON dbo.GyzcCare.UseState = dbo.UseState.Id LEFT OUTER JOIN" & _
     " dbo.LessMode ON dbo.GyzcCare.mode1 = dbo.LessMode.ID"
   txt = " SELECT sum(dbo.GyzcCare.Je) FROM dbo.DwBmCode INNER JOIN dbo.GyzcCode INNER JOIN " & _
     " dbo.GyzcCare ON dbo.GyzcCode.Bm = dbo.GyzcCare.CodeId ON" & _
     " dbo.DwBmCode.Bm = dbo.GyzcCare.DwbmId INNER JOIN" & _
     " dbo.AddMode ON dbo.GyzcCare.Mode = dbo.AddMode.ID INNER JOIN dbo.UseState ON dbo.GyzcCare.UseState = dbo.UseState.Id LEFT OUTER JOIN" & _
     " dbo.LessMode ON dbo.GyzcCare.mode1 = dbo.LessMode.ID"
If Option1.Value = True Then
sql = sql & " where dbo.GyzcCare.CzFlag <> 3"
txt = txt & " where dbo.GyzcCare.CzFlag <> 3"
End If
If Option2.Value = True Then
sql = sql & "  where dbo.GyzcCare.CzFlag = 0 "
txt = txt & "  where dbo.GyzcCare.CzFlag = 0 "
End If
If Option3.Value = True Then
sql = sql & "  where dbo.GyzcCare.CzFlag = 1 "
txt = txt & "  where dbo.GyzcCare.CzFlag = 1 "
End If
If Combo1.Text <> "" Then
sql = sql & " and dbo.GyzcCode.Bm  like " & "'" & Mid(Combo1.Text, 1, InStr(Combo1.Text, "-") - 1) & "%" & "'"
txt = txt & " and dbo.GyzcCode.Bm  like " & "'" & Mid(Combo1.Text, 1, InStr(Combo1.Text, "-") - 1) & "%" & "'"
End If
If Text1.Text <> "" Then
sql = sql & " and dbo.GyzcCare.Name Like " & "'" & Text1.Text & "%" & "'"
txt = txt & " and dbo.GyzcCare.Name Like " & "'" & Text1.Text & "%" & "'"
End If
If Text2.Text <> "" Then
sql = sql & " and dbo.GyzcCare.BH Like " & "'" & Text2.Text & "%" & "'"
txt = txt & " and dbo.GyzcCare.BH Like " & "'" & Text2.Text & "%" & "'"
End If
If Combo2.Text <> "" Then
sql = sql & " and dbo.AddMode.Name =" & "'" & Combo2.Text & "'"
txt = txt & " and dbo.AddMode.Name =" & "'" & Combo2.Text & "'"
End If
If Combo3.Text <> "" Then

sql = sql & " and dbo.DwBmCode.Bm like " & "'" & Mid(Combo3.Text, 1, InStr(Combo3.Text, "-") - 1) & "%" & "'"

txt = txt & " and dbo.DwBmCode.Bm like " & "'" & Mid(Combo3.Text, 1, InStr(Combo3.Text, "-") - 1) & "%" & "'"


End If
If Combo4.Text <> "" Then
sql = sql & " and dbo.LessMode.Name = " & "'" & Combo4.Text & "'"
txt = txt & " and dbo.LessMode.Name = " & "'" & Combo4.Text & "'"
End If
If Combo5.Text <> "" Then
sql = sql & " and dbo.UseState.Name = " & "'" & Combo5.Text & "'"
txt = txt & " and dbo.UseState.Name = " & "'" & Combo5.Text & "'"
End If
If Check1 = 1 Then
sql = sql & " and dbo.GyzcCare.GzZq>= " & "'" & time1.Value & "'" & _
" and  dbo.GyzcCare.GzZq< =" & "'" & time2.Value & "'"
If Check1 = 1 Then
txt = txt & " and dbo.GyzcCare.GzZq>= " & "'" & time1.Value & "'" & _
" and  dbo.GyzcCare.GzZq< =" & "'" & time2.Value & "'"
End If
End If
If Check2 = 1 Then
sql = sql & " and dbo.GyzcCare.YsZq>= " & "'" & time3.Value & "'" & _
" and  dbo.GyzcCare.YsZq<= " & "'" & time4.Value & "'"
txt = txt & " and dbo.GyzcCare.YsZq>= " & "'" & time3.Value & "'" & _
" and  dbo.GyzcCare.YsZq<= " & "'" & time4.Value & "'"
End If
Unload Me

Call myclass.AddGrid(sql, Bb1.MSHFlexGrid1)
Call myclass.Hj(txt, Bb1.MSHFlexGrid1)
Bb1.Show 1

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()

 Dim strSql As String
        strSql = "select Name from AddMode"
         Call myclass.AddDataComboBox(strSql, Combo2)
        strSql = "select * from GyzcCode "
       Call myclass.AddDataComboBox(strSql, Combo1)
        strSql = "select * from DwBmCode "
        Call myclass.AddDataComboBox(strSql, Combo3)
               strSql = "select Name from LessMode "
        Call myclass.AddDataComboBox(strSql, Combo4)
                       strSql = "select Name from UseState "
        Call myclass.AddDataComboBox(strSql, Combo5)
        Call checkEnable
End Sub
Sub checkEnable()
If Check1.Value = 0 Then
time1.Enabled = False
time2.Enabled = False
Else
If Check1.Value = 1 Then
time1.Enabled = True
time2.Enabled = True
End If
End If
If Check2.Value = 0 Then
time3.Enabled = False
time4.Enabled = False
Else
If Check2.Value = 1 Then
time3.Enabled = True
time4.Enabled = True
End If
End If
End Sub

Private Sub Check1_Click()
 Call checkEnable
End Sub
Private Sub Check2_Click()
 Call checkEnable
End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -