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

📄 form9.frm

📁 一个简单的公司进销存管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc4 
      Height          =   375
      Left            =   120
      Top             =   840
      Visible         =   0   'False
      Width           =   1560
      _ExtentX        =   2752
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc5 
      Height          =   375
      Left            =   120
      Top             =   1560
      Visible         =   0   'False
      Width           =   1560
      _ExtentX        =   2752
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "货物名称"
      Height          =   375
      Left            =   1440
      TabIndex        =   24
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "规    格"
      Height          =   375
      Left            =   1440
      TabIndex        =   23
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "颜    色"
      Height          =   375
      Left            =   7680
      TabIndex        =   22
      Top             =   1200
      Width           =   1575
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "进货时间"
      Height          =   375
      Left            =   1440
      TabIndex        =   21
      Top             =   2880
      Width           =   1575
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "供货商家"
      Height          =   375
      Left            =   1440
      TabIndex        =   20
      Top             =   2040
      Width           =   1575
   End
   Begin VB.Label Label6 
      Caption         =   "时间格式:2006年1月1日输入                           20060101,其余类似。"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   855
      Left            =   7800
      TabIndex        =   19
      Top             =   2640
      Width           =   3255
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "至"
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   5040
      TabIndex        =   18
      Top             =   2955
      Width           =   375
   End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc2.RecordSource = "select gg from jhmx where JTXHBS='0'and gg<>''and gg<>'*'group by gg"
Adodc2.Refresh
Set DataGrid3.DataSource = Adodc2
Set Text2.DataSource = Adodc2
Text2.DataField = "gg"
DataGrid3.Visible = True
End Sub

Private Sub Command2_Click()
Adodc3.RecordSource = "select ys from jhmx where JTXHBS='0'and ys<>''and ys<>'*' group by ys"
Adodc3.Refresh
Set DataGrid4.DataSource = Adodc3
Set Text3.DataSource = Adodc3
Text3.DataField = "ys"
DataGrid4.Visible = True

End Sub

Private Sub Command3_Click()
Adodc4.RecordSource = "select cj from jhmx where JTXHBS='0'and cj<>''and cj<>'*' group by cj"
Adodc4.Refresh
Set DataGrid5.DataSource = Adodc4
Set Text5.DataSource = Adodc4
Text5.DataField = "cj"
DataGrid5.Visible = True

End Sub

Private Sub Command4_Click()
Dim A As String
A = Text1 + "%"
Adodc1.RecordSource = "select cpmc from jhmx where cpmc<>'' and JTXHBS='0'and cpmc like'" & A & "'group by cpmc"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
Set Text1.DataSource = Adodc1
Text1.DataField = "cpmc"
DataGrid1.Visible = True
End Sub

Private Sub Command5_Click()
If Len(Text4) <> 0 And Len(Text4) < 4 Or Len(Text4) = 5 Or Len(Text4) = 7 Then
MsgBox "时间输入错误,请核实!", vbExclamation, "系统提示您"
GoTo 10
End If

Dim B As String
Dim c As String
Dim D As String
Dim E As Date
Dim F As String
B = "%" + Text1 + "%"
c = "%" + Text2 + "%"
D = "%" + Text3 + "%"

F = "%" + Text5 + "%"
If Text4 = "" Then
Text6 = "%"
End If
If Text4 = "" And Text7 = "" Then
Adodc5.RecordSource = "select cpmc,gg,sl,ys,cj,thsj,bz,cbj from jhmx where cpmc like'" & B & "'and gg like'" & c & "' and ys like'" & D & "'and cj like'" & F & "' and JTXHBS='0' group by cpmc,gg,sl,ys,cj,thsj,bz,cbj order by thsj "
Adodc5.Refresh
End If
If Text4 = "" And Text7 <> "" Then
Adodc5.RecordSource = "select cpmc,gg,sl,ys,cj,thsj,bz,cbj from jhmx where cpmc like'" & B & "'and gg like'" & c & "' and ys like'" & D & "'and cj like'" & F & "' and JTXHBS='0' and thsj<='" & Text7 & "'group by cpmc,gg,sl,ys,cj,thsj,bz,cbj order by thsj "
Adodc5.Refresh
End If
If Text4 <> "" And Text7 = "" Then
Adodc5.RecordSource = "select cpmc,gg,sl,ys,cj,thsj,bz,cbj from jhmx where cpmc like'" & B & "'and gg like'" & c & "' and ys like'" & D & "'and cj like'" & F & "' and JTXHBS='0' and thsj>='" & Text4 & "'group by cpmc,gg,sl,ys,cj,thsj,bz,cbj order by thsj "
Adodc5.Refresh
End If
If Text4 <> "" And Text7 <> "" Then
Adodc5.RecordSource = "select cpmc,gg,sl,ys,cj,thsj,bz,cbj from jhmx where cpmc like'" & B & "'and gg like'" & c & "' and ys like'" & D & "'and cj like'" & F & "' and JTXHBS='0' and thsj between '" & Text4 & "'and '" & Text7 & "'group by cpmc,gg,sl,ys,cj,thsj,bz,cbj order by thsj "
Adodc5.Refresh
End If

If Adodc5.Recordset.BOF = True And Adodc5.Recordset.EOF = True Then
MsgBox "没有你要查找的退货记录,请核实!", vbExclamation, "系统提示您"
GoTo 10
End If
Set DataGrid2.DataSource = Adodc5
10 End Sub

Private Sub Command6_Click()
Unload Form9
End Sub

Private Sub DataGrid1_Click()
DataGrid1.Visible = False
End Sub

Private Sub DataGrid1_LostFocus()
DataGrid1.Visible = False
End Sub

Private Sub DataGrid3_Click()
DataGrid3.Visible = False
End Sub

Private Sub DataGrid3_LostFocus()
DataGrid3.Visible = False
End Sub

Private Sub DataGrid4_Click()
DataGrid4.Visible = False
End Sub

Private Sub DataGrid4_LostFocus()
DataGrid4.Visible = False
End Sub

Private Sub DataGrid5_Click()
DataGrid5.Visible = False
End Sub

Private Sub DataGrid5_LostFocus()
DataGrid5.Visible = False
End Sub

Private Sub Form_Click()
DataGrid1.Visible = False
DataGrid3.Visible = False
DataGrid4.Visible = False
DataGrid5.Visible = False
End Sub

Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc2.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc3.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc4.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""
Adodc5.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Form1.Text6 & ";Persist Security Info=True;User ID=" & Form1.Text5 & ";Initial Catalog=" & Form1.Text8 & ";Data Source=" & Form1.Text4 & ""

End Sub

Private Sub Text1_Change()
DataGrid1.Visible = False
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim A As String
A = Text1 + "%"
Adodc1.RecordSource = "select cpmc from jhmx where cpmc<>'' and JTXHBS='0'and cpmc like'" & A & "'group by cpmc"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
Set Text1.DataSource = Adodc1
Text1.DataField = "cpmc"
DataGrid1.Visible = True
End If


End Sub

Private Sub Text2_Click()
DataGrid3.Visible = False
End Sub

Private Sub Text3_Click()
DataGrid4.Visible = False
End Sub


Private Sub Text5_Click()
DataGrid5.Visible = False
End Sub

⌨️ 快捷键说明

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