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

📄 form1.frm

📁 一个简单的公司进销存管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form1 
   Caption         =   "英策公司进销存管理系统"
   ClientHeight    =   2760
   ClientLeft      =   6060
   ClientTop       =   4425
   ClientWidth     =   6135
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   2760
   ScaleWidth      =   6135
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text8 
      Height          =   315
      Left            =   3120
      TabIndex        =   14
      Top             =   2400
      Visible         =   0   'False
      Width           =   1695
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   4920
      TabIndex        =   13
      Top             =   240
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退 出"
      Height          =   375
      Left            =   4920
      TabIndex        =   12
      Top             =   1800
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "确 定"
      Height          =   375
      Left            =   4920
      TabIndex        =   11
      Top             =   720
      Width           =   975
   End
   Begin MSAdodcLib.Adodc Adodc3 
      Height          =   495
      Left            =   4200
      Top             =   3360
      Visible         =   0   'False
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   873
      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         =   "Adodc3"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox Text6 
      Height          =   495
      Left            =   840
      TabIndex        =   10
      Top             =   4440
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text5 
      Height          =   495
      Left            =   840
      TabIndex        =   9
      Top             =   3720
      Visible         =   0   'False
      Width           =   1695
   End
   Begin VB.TextBox Text4 
      Height          =   315
      Left            =   840
      TabIndex        =   8
      Top             =   2880
      Visible         =   0   'False
      Width           =   1335
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   1560
      Top             =   120
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   582
      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            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Height          =   2295
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4335
      Begin VB.TextBox Text3 
         Height          =   315
         Left            =   2640
         TabIndex        =   7
         Top             =   240
         Visible         =   0   'False
         Width           =   1575
      End
      Begin VB.CommandButton Command1 
         Caption         =   "▼"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   5.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3480
         TabIndex        =   6
         Top             =   720
         Width           =   255
      End
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   825
         Left            =   1800
         TabIndex        =   5
         Top             =   1005
         Visible         =   0   'False
         Width           =   1935
         _ExtentX        =   3413
         _ExtentY        =   1455
         _Version        =   393216
         AllowUpdate     =   -1  'True
         BackColor       =   -2147483633
         ColumnHeaders   =   0   'False
         ForeColor       =   16711680
         HeadLines       =   1
         RowHeight       =   17
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   1
         BeginProperty Column00 
            DataField       =   "xm"
            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 
            ScrollBars      =   2
            AllowRowSizing  =   0   'False
            AllowSizing     =   0   'False
            RecordSelectors =   0   'False
            BeginProperty Column00 
               ColumnWidth     =   1695.118
            EndProperty
         EndProperty
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H8000000F&
         ForeColor       =   &H00FF0000&
         Height          =   330
         IMEMode         =   3  'DISABLE
         Left            =   1800
         TabIndex        =   1
         Top             =   680
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H8000000F&
         ForeColor       =   &H00FF0000&
         Height          =   330
         IMEMode         =   3  'DISABLE
         Left            =   1800
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   1400
         Width           =   1935
      End
      Begin MSAdodcLib.Adodc Adodc2 
         Height          =   330
         Left            =   0
         Top             =   0
         Visible         =   0   'False
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   582
         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            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.Label Label1 
         Caption         =   "用户姓名:"
         Height          =   255
         Left            =   600
         TabIndex        =   4
         Top             =   720
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "用户密码:"
         Height          =   255
         Left            =   600
         TabIndex        =   3
         Top             =   1440
         Width           =   1215
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.RecordSource = "select xm,ZW from ygdl"
Adodc1.Refresh
Set Text1.DataSource = Adodc1
Text1.DataField = "xm"
Set Text3.DataSource = Adodc1
Text3.DataField = "ZW"
Set DataGrid1.DataSource = Adodc1
DataGrid1.Visible = True
End Sub

Private Sub Command2_Click()
Adodc2.RecordSource = "select * from ygdl where xm like'" & Text1 & "' and mm like'" & Text2 & "'"
Adodc2.Refresh
If Adodc2.Recordset.BOF = True And Adodc2.Recordset.EOF = True Then
MsgBox "对不起,密码不正确,请核实!", vbExclamation, "系统提示您"
Else

Load Form2
Form2.Visible = True

Set Text7.DataSource = Adodc2
Text7.DataField = "id"
End If
End Sub

Private Sub Command3_Click()
End
End Sub

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

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

Private Sub Form_Load()
Dim A As String
A = App.Path + "\dl.mdb"
Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & A & ";Persist Security Info=False"
Adodc3.RecordSource = "sjk"
Adodc3.Refresh
Set Text4.DataSource = Adodc3
Text4.DataField = "fwqm"
Set Text5.DataSource = Adodc3
Text5.DataField = "yhm"
Set Text6.DataSource = Adodc3
Text6.DataField = "mm"
Set Text8.DataSource = Adodc3
Text8.DataField = "sjk"
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Text6 & ";Persist Security Info=True;User ID=" & Text5 & ";Initial Catalog=" & Text8 & ";Data Source=" & Text4 & ""
Adodc2.ConnectionString = "Provider=SQLOLEDB.1;Password=" & Text6 & ";Persist Security Info=True;User ID=" & Text5 & ";Initial Catalog=" & Text8 & ";Data Source=" & Text4 & ""

End Sub

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


Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Adodc2.RecordSource = "select * from ygdl where xm like'" & Text1 & "' and mm like'" & Text2 & "'"
Adodc2.Refresh
If Adodc2.Recordset.BOF = True And Adodc2.Recordset.EOF = True Then
MsgBox "对不起,密码不正确,请核实!", vbExclamation, "系统提示您"
Else
Set Text7.DataSource = Adodc2
Text7.DataField = "id"
Load Form2
Form2.Visible = True
End If
End If
End Sub

⌨️ 快捷键说明

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