main_cxtj_warehoursefind.frm

来自「医药进销存管理系统 对医药的购买销售和库存进行系统管理」· FRM 代码 · 共 562 行 · 第 1/2 页

FRM
562
字号
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   12
      BeginProperty Column00 
         DataField       =   "药品编号"
         Caption         =   "药品编号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   "药品名称"
         Caption         =   "药品名称"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "规格"
         Caption         =   "规格"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "产地"
         Caption         =   "产地"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "有效期至"
         Caption         =   "有效期至"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "批号"
         Caption         =   "批号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "数量"
         Caption         =   "数量"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "进货价"
         Caption         =   "进货价"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08 
         DataField       =   "批发价"
         Caption         =   "批发价"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column09 
         DataField       =   "零售价"
         Caption         =   "零售价"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column10 
         DataField       =   "供货商名称"
         Caption         =   "供货商名称"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column11 
         DataField       =   "进货单据号"
         Caption         =   "进货单据号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   854.929
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1665.071
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1110.047
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   659.906
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   659.906
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   675.213
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   645.165
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   689.953
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column11 
            ColumnWidth     =   1140.095
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "main_cxtj_warehoursefind"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
  '向combo1中添加查询项目列表
  Combo1.AddItem ("药品编号")
  Combo1.AddItem ("药品名称")
  Combo1.AddItem ("批号")
  Combo1.AddItem ("规格")
  Combo1.AddItem ("产地")
  Combo1.AddItem ("供货商名称")
  Combo1.AddItem ("进货单据号")
  Combo1.ListIndex = 1
  '向combo2中添加查询条件列表
  Combo2.AddItem ("like")
  Combo2.AddItem ("=")
  Combo2.ListIndex = 0
  '汇总记录、数量、金额
  Adodc2.RecordSource = "select count(*)as 品种,sum(数量)as 数量1,sum(金额)as 金额1 from tb_warehouse_detailed"
  Adodc2.Refresh
  If Adodc2.Recordset.Fields(0) <> "" Then Labpz.Caption = Adodc2.Recordset.Fields(0) Else Labpz.Caption = 0
  If Adodc2.Recordset.Fields(1) <> "" Then Labsl.Caption = Adodc2.Recordset.Fields(1) Else Labsl.Caption = 0
  If Adodc2.Recordset.Fields(2) <> "" Then Labje.Caption = Format(Adodc2.Recordset.Fields(2), "0.00") Else Labje.Caption = "0.00"
  DTP1.Value = Date - 30
  DTP2.Value = Date
End Sub
Private Sub Comfind_Click()                        '查询统计入库药品信息
If Check1(0).Value = 0 And Check1(1).Value = 1 Then
Select Case Combo2.Text
Case Is = "like"
Adodc1.RecordSource = "select * from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " like'%'+ '" + Text1.Text + "'+'%')"
Adodc1.Refresh
Adodc2.RecordSource = _
   "select count(*)as pz,sum(数量)as 数量1,sum(金额)as 金额1 from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " like +'%'+ '" + Text1.Text + "'+'%')"
Adodc2.Refresh
Case Is = "="
Adodc1.RecordSource = "select * from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " = '" + Text1.Text + "')"
Adodc1.Refresh
Adodc2.RecordSource = _
   "select count(*)as pz,sum(数量)as 数量1,sum(金额)as 金额1 from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " = '" + Text1.Text + "')"
Adodc2.Refresh
End Select
End If
If Check1(0).Value = 1 And Check1(1).Value = 0 Then
Adodc1.RecordSource = "select * from tb_warehouse_detailed where 进货日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'"
Adodc1.Refresh
Adodc2.RecordSource = "select count(*)as pz,sum(数量)as 数量1,sum(金额)as 金额1 from tb_warehouse_detailed where 进货日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "'"
Adodc2.Refresh
End If
If Check1(0).Value = 1 And Check1(1).Value = 1 Then
 Select Case Combo2.Text
 Case Is = "like"
 Adodc1.RecordSource = "select * from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " like'%'+ '" + Text1.Text + "'+'%'and 进货日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "')"
 Adodc1.Refresh
 Adodc2.RecordSource = "select count(*)as pz,sum(数量)as 数量1,sum(金额)as 金额1 from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " like +'%'+ '" + Text1.Text + "'+'%'and 进货日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "')"
 Adodc2.Refresh
 Case Is = "="
 Adodc1.RecordSource = "select * from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " = '" + Text1.Text + "'and 进货日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "')"
 Adodc1.Refresh
 Adodc2.RecordSource = "select count(*)as pz,sum(数量)as 数量1,sum(金额)as 金额1 from tb_warehouse_detailed where (tb_warehouse_detailed." & Combo1.Text & " = '" + Text1.Text + "'and 进货日期 between '" + Str(DTP1.Value) + "'AND '" + Str(DTP2.Value) + "')"
 Adodc2.Refresh
 End Select
End If
If Adodc2.Recordset.Fields(0) <> "" Then Labpz.Caption = Adodc2.Recordset.Fields(0) Else Labpz.Caption = 0
If Adodc2.Recordset.Fields(1) <> "" Then Labsl.Caption = Adodc2.Recordset.Fields(1) Else Labsl.Caption = 0
If Adodc2.Recordset.Fields(2) <> "" Then Labje.Caption = Format(Adodc2.Recordset.Fields(2), "0.00") Else Labje.Caption = "0.00"
End Sub
Private Sub Comend_Click()
  Unload Me
End Sub

⌨️ 快捷键说明

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