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

📄 form4.frm

📁 这是我毕业设计的!是关于管理仓库的一个系统。用vb做的!做的不好!希望大家提意见!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form4 
   BorderStyle     =   5  'Sizable ToolWindow
   Caption         =   "物资基本信息管理"
   ClientHeight    =   5835
   ClientLeft      =   2565
   ClientTop       =   2295
   ClientWidth     =   8745
   LinkTopic       =   "Form4"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5835
   ScaleWidth      =   8745
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command5 
      Caption         =   "退出"
      Height          =   375
      Left            =   5760
      TabIndex        =   26
      Top             =   4920
      Width           =   2055
   End
   Begin VB.Frame Frame3 
      Caption         =   "物资基本信息"
      Height          =   2415
      Left            =   720
      TabIndex        =   12
      Top             =   2400
      Width           =   7455
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   5640
         TabIndex        =   28
         Top             =   480
         Width           =   1095
      End
      Begin VB.TextBox Text10 
         Height          =   375
         Left            =   3360
         TabIndex        =   25
         Top             =   1680
         Width           =   1065
      End
      Begin VB.TextBox Text9 
         Height          =   375
         Left            =   1200
         TabIndex        =   24
         Top             =   1680
         Width           =   1095
      End
      Begin VB.TextBox Text8 
         Height          =   375
         Left            =   5640
         TabIndex        =   23
         Top             =   1680
         Width           =   1095
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   3600
         TabIndex        =   22
         Top             =   480
         Width           =   1095
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   1320
         TabIndex        =   21
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "单价:"
         Height          =   375
         Left            =   4920
         TabIndex        =   27
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label Label13 
         Caption         =   "金额:"
         Height          =   495
         Left            =   2760
         TabIndex        =   20
         Top             =   1800
         Width           =   1095
      End
      Begin VB.Label Label12 
         Caption         =   "数量:"
         Height          =   495
         Left            =   720
         TabIndex        =   19
         Top             =   1800
         Width           =   1095
      End
      Begin VB.Label Label11 
         Caption         =   "计量单位:"
         Height          =   375
         Left            =   4680
         TabIndex        =   18
         Top             =   1680
         Width           =   975
      End
      Begin VB.Label Label5 
         Caption         =   "物资名称:"
         Height          =   375
         Left            =   2640
         TabIndex        =   14
         Top             =   480
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "物资编号:"
         Height          =   375
         Left            =   360
         TabIndex        =   13
         Top             =   600
         Width           =   1095
      End
   End
   Begin VB.Frame Frame4 
      Caption         =   "物资编号"
      Height          =   1575
      Left            =   4800
      TabIndex        =   6
      Top             =   120
      Width           =   3495
      Begin VB.CommandButton Command3 
         Caption         =   "查询"
         Height          =   375
         Left            =   1080
         TabIndex        =   11
         Top             =   960
         Width           =   1215
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   720
         TabIndex        =   7
         Text            =   "001"
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "(如 001)"
         Height          =   375
         Left            =   2400
         TabIndex        =   9
         Top             =   480
         Width           =   975
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Frame2"
      Height          =   15
      Left            =   480
      TabIndex        =   5
      Top             =   2040
      Width           =   135
   End
   Begin VB.Frame Frame1 
      Caption         =   "物资名"
      Height          =   1575
      Left            =   720
      TabIndex        =   2
      Top             =   120
      Width           =   3255
      Begin VB.CommandButton Command2 
         Caption         =   "查询"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   840
         TabIndex        =   4
         Top             =   960
         Width           =   1215
      End
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   3
         Text            =   "钢材"
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "(如 钢材)"
         Height          =   375
         Left            =   2040
         TabIndex        =   8
         Top             =   480
         Width           =   1095
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   960
      TabIndex        =   1
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   360
      Width           =   1335
   End
   Begin VB.Label Label8 
      Caption         =   "Label8"
      Height          =   495
      Left            =   3720
      TabIndex        =   17
      Top             =   2400
      Width           =   1215
   End
   Begin VB.Label Label7 
      Caption         =   "Label7"
      Height          =   495
      Left            =   3720
      TabIndex        =   16
      Top             =   2400
      Width           =   1215
   End
   Begin VB.Label Label6 
      Caption         =   "Label6"
      Height          =   495
      Left            =   3720
      TabIndex        =   15
      Top             =   2400
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "or"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4200
      TabIndex        =   10
      Top             =   600
      Width           =   615
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim x As Single
Dim y As Single
Dim l As Single
Dim m As Single

Private Sub Command2_Click()
Dim pubConn As New ADODB.Connection
Dim rsTable As New ADODB.Recordset
Dim rsTable1 As New ADODB.Recordset
Dim rsTable2 As New ADODB.Recordset
Dim strSQL As String
If Text2.Text <> "" Then
pubConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\luojie.mdb" & ";" & "Persist Security Info=False"
pubConn.ConnectionTimeout = 30
pubConn.Open
rsTable.CursorLocation = adUseClient
strSQL = "select avg(数量),count(*) from input11 where 物资名称='" & Trim(Text2.Text) & "'"
rsTable.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
x = rsTable!expr1000
y = rsTable!expr1001
rsTable1.CursorLocation = adUseClient
strSQL = "select avg(数量),count(*) from output11 where 物资名称='" & Trim(Text2.Text) & "'"
rsTable1.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
l = rsTable1!expr1000
m = rsTable1!expr1001
Text9.Text = x * y - l * m
rsTable2.CursorLocation = adUseClient
strSQL = "select * from input11 where 物资名称='" & Trim(Text2.Text) & "'"
rsTable2.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
    Text4.Text = rsTable2!物资编号
    Text5.Text = rsTable2!物资名称
    Text6.Text = rsTable2!单价
    Text10.Text = rsTable2!金额
    Text8.Text = rsTable2!计量单位
    Else
    m = MsgBox("错误,请重新登录", vbExclamation)
    End If
End Sub

Private Sub Command3_Click()
Dim pubConn As New ADODB.Connection
Dim rsTable As New ADODB.Recordset
Dim rsTable1 As New ADODB.Recordset
Dim rsTable2 As New ADODB.Recordset
Dim strSQL As String
If Text3.Text <> "" Then
pubConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\luojie.mdb" & ";" & "Persist Security Info=False"
pubConn.ConnectionTimeout = 30
pubConn.Open
rsTable.CursorLocation = adUseClient
strSQL = "select avg(数量),count(*) from input11 where 物资编号='" & Trim(Text3.Text) & "'"
rsTable.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
x = rsTable!expr1000
y = rsTable!expr1001
rsTable1.CursorLocation = adUseClient
strSQL = "select avg(数量),count(*) from output11 where 物资编号='" & Trim(Text3.Text) & "'"
rsTable1.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
l = rsTable1!expr1000
m = rsTable1!expr1001
Text9.Text = x * y - l * m
rsTable2.CursorLocation = adUseClient
strSQL = "select * from input11 where 物资编号='" & Trim(Text3.Text) & "'"
rsTable2.Open strSQL, pubConn, adOpenDynamic, adLockOptimistic
    Text4.Text = rsTable2!物资编号
    Text5.Text = rsTable2!物资名称
    Text6.Text = rsTable2!单价
    Text10.Text = rsTable2!金额
    Text8.Text = rsTable2!计量单位
    Else
    m = MsgBox("错误,请重新登录", vbExclamation)
   End If
End Sub

Private Sub Command5_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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