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

📄 form7.frm

📁 用VB开发的一套邮政编码区号查询
💻 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 youjinset 
   Caption         =   "预警设置"
   ClientHeight    =   8010
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11880
   LinkTopic       =   "Form1"
   ScaleHeight     =   8010
   ScaleWidth      =   11880
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command9 
      Caption         =   "其它设备"
      Height          =   495
      Left            =   10440
      TabIndex        =   13
      Top             =   3960
      Width           =   975
   End
   Begin VB.CommandButton Command5 
      Caption         =   "添加物流"
      Height          =   495
      Left            =   10440
      TabIndex        =   12
      Top             =   3120
      Width           =   975
   End
   Begin VB.CommandButton Command4 
      Caption         =   "添加信息"
      Height          =   495
      Left            =   10440
      TabIndex        =   11
      Top             =   2280
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "保存"
      Height          =   495
      Left            =   10440
      TabIndex        =   10
      Top             =   6360
      Width           =   975
   End
   Begin VB.ComboBox Combo2 
      DataField       =   "ia"
      DataSource      =   "Adodc1"
      Height          =   300
      ItemData        =   "Form7.frx":0000
      Left            =   360
      List            =   "Form7.frx":0010
      TabIndex        =   9
      Text            =   "Combo2"
      Top             =   6240
      Width           =   1095
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   375
      Left            =   2640
      Top             =   120
      Visible         =   0   'False
      Width           =   1695
      _ExtentX        =   2990
      _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         =   "Adodc2"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton Command8 
      Caption         =   "退出"
      Height          =   495
      Left            =   10440
      TabIndex        =   8
      Top             =   5520
      Width           =   975
   End
   Begin VB.CommandButton Command7 
      Caption         =   "删除"
      Height          =   495
      Left            =   10440
      TabIndex        =   7
      Top             =   4800
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "添加办公"
      Height          =   495
      Left            =   10440
      TabIndex        =   6
      Top             =   1560
      Width           =   975
   End
   Begin VB.TextBox Text4 
      Height          =   270
      Left            =   8040
      TabIndex        =   5
      Text            =   "Text4"
      Top             =   6240
      Width           =   1935
   End
   Begin VB.TextBox Text3 
      Height          =   270
      Left            =   6000
      TabIndex        =   4
      Text            =   "Text3"
      Top             =   6240
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   3960
      TabIndex        =   3
      Text            =   "Text2"
      Top             =   6240
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   2160
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   6240
      Width           =   1095
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   360
      Top             =   120
      Visible         =   0   'False
      Width           =   2040
      _ExtentX        =   3598
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\zjssoft\zjsdata.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\zjssoft\zjsdata.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "ia"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "增删货物字"
      Height          =   4575
      Left            =   240
      TabIndex        =   0
      Top             =   960
      Width           =   9855
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "Form7.frx":003A
         Height          =   3735
         Left            =   120
         TabIndex        =   1
         Top             =   600
         Width           =   9615
         _ExtentX        =   16960
         _ExtentY        =   6588
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         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     =   2
         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
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin VB.Label Label5 
         Height          =   255
         Left            =   8760
         TabIndex        =   20
         Top             =   240
         Width           =   495
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "命令 "
      Height          =   6255
      Left            =   10200
      TabIndex        =   14
      Top             =   960
      Width           =   1455
   End
   Begin VB.Frame Frame3 
      Caption         =   "文本添加"
      Height          =   1095
      Left            =   240
      TabIndex        =   15
      Top             =   5760
      Width           =   9855
      Begin VB.Label Label4 
         Caption         =   "地址"
         Height          =   255
         Left            =   7440
         TabIndex        =   19
         Top             =   480
         Width           =   495
      End
      Begin VB.Label Label3 
         Caption         =   "电话"
         Height          =   255
         Left            =   5280
         TabIndex        =   18
         Top             =   480
         Width           =   375
      End
      Begin VB.Label Label1 
         Caption         =   "编号"
         Height          =   255
         Left            =   1560
         TabIndex        =   17
         Top             =   480
         Width           =   375
      End
      Begin VB.Label Label2 
         Caption         =   "名称"
         Height          =   255
         Left            =   3240
         TabIndex        =   16
         Top             =   480
         Width           =   375
      End
   End
End
Attribute VB_Name = "youjinset"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()





 DataGrid1.AllowAddNew = True
 DataGrid1.AllowUpdate = True
 DataGrid1.AllowArrows = True
 DataGrid1.AllowDelete = True

  Dim STRSQL As String
      Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\zjssoft\zjsdata.mdb;Persist Security Info=False"
      Adodc2.CommandType = adCmdText
 
      STRSQL = "select * from officlist  where 类别='" & Combo2.Text & "' "
      Adodc2.RecordSource = STRSQL
      Set DataGrid1.DataSource = Adodc2
      DataGrid1.Refresh
      Adodc2.Refresh
      Text1.SetFocus
Label5.Caption = "" & Adodc2.Recordset.RecordCount & ""
End Sub

Private Sub Command3_Click()
    Adodc2.Recordset.addnew
    If Text1.Text = "" Or (Text2.Text = "" Or Text4.Text = "" Or Text3.Text = "") Then
       MsgBox "输入信息不完整,请重输入", vbOKOnly + vbExclamation, "提示"
       Text1.SetFocus
    Exit Sub
       Else
      Command2.Visible = True
      DataGrid1.AllowDelete = True
      DataGrid1.AllowUpdate = True
      DataGrid1.AllowArrows = True
      DataGrid1.AllowAddNew = True
 
       Adodc2.Recordset("编号") = Text1.Text
       Adodc2.Recordset("货物名称") = Text2.Text
      Adodc2.Recordset("厂家电话") = Text3.Text
      Adodc2.Recordset("厂家地址") = Text4.Text
       Adodc2.Recordset("类别") = Combo2.Text
      Refresh
  Text1.Text = ""
  Text2.Text = ""
  Text3.Text = ""
  Text4.Text = ""

End If
                 
End Sub

Private Sub Command4_Click()

 DataGrid1.AllowAddNew = True
 DataGrid1.AllowUpdate = True
 DataGrid1.AllowArrows = True
 DataGrid1.AllowDelete = True

  Dim STRSQL As String
      Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\zjssoft\zjsdata.mdb;Persist Security Info=False"
      Adodc2.CommandType = adCmdText
 
      STRSQL = "select * from inforlist  where 类别='" & Combo2.Text & "' "
      Adodc2.RecordSource = STRSQL
      Set DataGrid1.DataSource = Adodc2
      DataGrid1.Refresh
      Adodc2.Refresh
      Text1.SetFocus
Label5.Caption = "" & Adodc2.Recordset.RecordCount & ""
End Sub

Private Sub Command5_Click()
  Dim STRSQL As String
      Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\zjssoft\zjsdata.mdb;Persist Security Info=False"
      Adodc2.CommandType = adCmdText
 
      STRSQL = "select * from wllist  where 类别='" & Combo2.Text & "' "
      Adodc2.RecordSource = STRSQL
      Set DataGrid1.DataSource = Adodc2
      DataGrid1.Refresh
      Adodc2.Refresh
      Text1.SetFocus
Label5.Caption = "" & Adodc2.Recordset.RecordCount & ""
End Sub

Private Sub Command8_Click()
End
End Sub

Private Sub Command9_Click()
Dim STRSQL As String
      Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\zjssoft\zjsdata.mdb;Persist Security Info=False"
      Adodc2.CommandType = adCmdText
 
      STRSQL = "select * from otherlist where 类别='" & Combo2.Text & "' "
      Adodc2.RecordSource = STRSQL
      Set DataGrid1.DataSource = Adodc2
      DataGrid1.Refresh
      Adodc2.Refresh
      Text1.SetFocus
End Sub

Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = "" '

End Sub

⌨️ 快捷键说明

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