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

📄 form_areanumber.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 Form_areanumber 
   Caption         =   "邮编及区号管理"
   ClientHeight    =   6600
   ClientLeft      =   3210
   ClientTop       =   2655
   ClientWidth     =   9075
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6600
   ScaleWidth      =   9075
   Begin VB.Frame Frame3 
      Height          =   2895
      Left            =   6000
      TabIndex        =   6
      Top             =   1680
      Width           =   2895
      Begin VB.CommandButton Command5 
         Caption         =   "全部显示"
         Height          =   495
         Left            =   1560
         TabIndex        =   13
         Top             =   1680
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H80000018&
         Height          =   375
         Left            =   360
         TabIndex        =   12
         Text            =   "韶关"
         Top             =   1080
         Width           =   2055
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "Form_areanumber.frx":0000
         Left            =   360
         List            =   "Form_areanumber.frx":000D
         TabIndex        =   11
         Text            =   "城市名"
         Top             =   600
         Width           =   2055
      End
      Begin VB.CommandButton Command6 
         Caption         =   "上一个"
         Height          =   495
         Left            =   240
         TabIndex        =   9
         Top             =   2280
         Width           =   1095
      End
      Begin VB.CommandButton Command7 
         Caption         =   "下一个"
         Height          =   495
         Left            =   1560
         TabIndex        =   8
         Top             =   2280
         Width           =   1095
      End
      Begin VB.CommandButton Command8 
         Caption         =   "查询"
         Height          =   495
         Left            =   240
         TabIndex        =   7
         Top             =   1680
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "查询条件:"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   240
         Width           =   975
      End
   End
   Begin VB.Frame Frame1 
      Height          =   1455
      Left            =   6000
      TabIndex        =   1
      Top             =   120
      Width           =   2895
      Begin VB.CommandButton Command1 
         Caption         =   "增加"
         Height          =   495
         Left            =   240
         TabIndex        =   5
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Caption         =   "修改"
         Height          =   495
         Left            =   1560
         TabIndex        =   4
         Top             =   240
         Width           =   1095
      End
      Begin VB.CommandButton Command3 
         Caption         =   "删除"
         Height          =   495
         Left            =   240
         TabIndex        =   3
         Top             =   840
         Width           =   1095
      End
      Begin VB.CommandButton Command4 
         Caption         =   "取消"
         Height          =   495
         Left            =   1560
         TabIndex        =   2
         Top             =   840
         Width           =   1095
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Form_areanumber.frx":0025
      Height          =   6375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5655
      _ExtentX        =   9975
      _ExtentY        =   11245
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      AllowAddNew     =   -1  'True
      AllowDelete     =   -1  'True
      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     =   3
      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
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1005.165
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   6120
      Top             =   5760
      Visible         =   0   'False
      Width           =   2295
      _ExtentX        =   4048
      _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         =   $"Form_areanumber.frx":003A
      OLEDBString     =   $"Form_areanumber.frx":00D5
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 邮编及区号"
      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
End
Attribute VB_Name = "Form_areanumber"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
End Sub

Private Sub Command2_Click()

Adodc1.Recordset.Update
MsgBox "修改成功"
End Sub

Private Sub Command3_Click()
Adodc1.Recordset.Delete
End Sub

Private Sub Command4_Click()
Adodc1.Recordset.CancelUpdate
End Sub

Private Sub Command5_Click()
Adodc1.RecordSource = "select * from 邮编及区号 "
Adodc1.Refresh
End Sub

Private Sub Command6_Click()
If Adodc1.Recordset.BOF Then
   Adodc1.Recordset.MoveFirst
 MsgBox "已是第一条记录了哟~~"
Else
 Adodc1.Recordset.MovePrevious
End If
End Sub

Private Sub Command7_Click()
If Adodc1.Recordset.EOF Then
   Adodc1.Recordset.MoveLast
 MsgBox "已是最后一条记录了哟~~"
Else
 Adodc1.Recordset.MoveNext
End If
End Sub

Private Sub Command8_Click()
Dim capitulation As String
Dim haha As String
capitulation = Combo1.Text
haha = Text1.Text

Adodc1.RecordSource = "select * from 邮编及区号 where " & capitulation & " =  '" & haha & "'"

Adodc1.Refresh

If Adodc1.Recordset.EOF Then '
MsgBox "对不起,找不到你要的数据!"

End If
End Sub

⌨️ 快捷键说明

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