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

📄 form1.frm

📁 本文件包含200个visual baisc实例
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form Form1 
   Caption         =   "连接加密的Access数据库(使用dao控件)"
   ClientHeight    =   4320
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8025
   LinkTopic       =   "Form1"
   ScaleHeight     =   4320
   ScaleWidth      =   8025
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command4 
      Caption         =   "最后一条"
      Height          =   345
      Left            =   4485
      TabIndex        =   5
      Top             =   3750
      Width           =   1365
   End
   Begin VB.CommandButton Command1 
      Caption         =   "第一条"
      Height          =   345
      Left            =   405
      TabIndex        =   4
      Top             =   3750
      Width           =   1365
   End
   Begin VB.CommandButton Command3 
      Caption         =   "下一条"
      Height          =   345
      Left            =   3135
      TabIndex        =   3
      Top             =   3750
      Width           =   1365
   End
   Begin VB.CommandButton Command2 
      Caption         =   "上一条"
      Height          =   345
      Left            =   1755
      TabIndex        =   2
      Top             =   3750
      Width           =   1365
   End
   Begin VB.CommandButton Command11 
      Caption         =   "退出"
      Height          =   360
      Left            =   6195
      TabIndex        =   1
      Top             =   3750
      Width           =   1470
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "Form1.frx":0000
      Height          =   2835
      Left            =   195
      OleObjectBlob   =   "Form1.frx":0014
      TabIndex        =   0
      Top             =   630
      Width           =   7665
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   "E:\编程技巧\xcx\连接加密的access数据库(使用dao控件)\sj.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   420
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "sy"
      Top             =   3270
      Visible         =   0   'False
      Width           =   4575
   End
   Begin VB.Label Label1 
      Caption         =   "药品名称数据清单"
      Height          =   315
      Left            =   3090
      TabIndex        =   6
      Top             =   270
      Width           =   2805
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
  Data1.DatabaseName = App.Path & "\sj.mdb"    '设置连接数据库
  Data1.Connect = ";pwd=" & 111                '设置连接密码
  Data1.RecordSource = "sy"                    '设置数据表
  Data1.Refresh
End Sub
Private Sub Command1_Click() '移动记录到第一行
  If Not Data1.Recordset.BOF Then Data1.Recordset.MoveFirst    '
End Sub
Private Sub Command2_Click() '移动记录到前一行
  If Not Data1.Recordset.BOF Then Data1.Recordset.MovePrevious
End Sub
Private Sub Command3_Click() '移动记录到后一行
  If Not Data1.Recordset.EOF Then Data1.Recordset.MoveNext
End Sub
Private Sub Command4_Click() '移动记录到最后一行
  If Not Data1.Recordset.EOF Then Data1.Recordset.MoveLast
End Sub
Private Sub Command11_Click()
  End
End Sub

⌨️ 快捷键说明

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