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

📄 客房信息.frm

📁 vb access客房管理系统经典实例添加了模块与access连接
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "客房信息浏览"
   ClientHeight    =   3900
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5025
   Icon            =   "客房信息.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Picture         =   "客房信息.frx":0442
   ScaleHeight     =   3900
   ScaleWidth      =   5025
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1200
      TabIndex        =   13
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   3600
      TabIndex        =   12
      Top             =   240
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1200
      TabIndex        =   11
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1200
      TabIndex        =   10
      Top             =   1680
      Width           =   1095
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1200
      TabIndex        =   9
      Top             =   2520
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "下一条"
      Height          =   375
      Left            =   2640
      TabIndex        =   8
      Top             =   3360
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "上一条"
      Height          =   375
      Left            =   840
      TabIndex        =   7
      Top             =   3360
      Width           =   1215
   End
   Begin VB.TextBox Text6 
      Height          =   1575
      Left            =   2640
      TabIndex        =   6
      Top             =   1320
      Width           =   2175
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "备注信息:"
      Height          =   375
      Left            =   2640
      TabIndex        =   5
      Top             =   1080
      Width           =   1095
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "客房状态:"
      Height          =   375
      Left            =   2640
      TabIndex        =   4
      Top             =   360
      Width           =   975
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "客房价格:"
      Height          =   495
      Left            =   120
      TabIndex        =   3
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "客房类型:"
      Height          =   495
      Left            =   120
      TabIndex        =   2
      Top             =   1800
      Width           =   1095
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "客房等级:"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "房间号:"
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   855
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public rs3 As ADODB.Recordset
Private Sub Command1_Click()


rs3.MovePrevious
If rs3.BOF = True Then
  rs3.MoveFirst
  'Command1.Enabled = FalseText1 = Adodc1.Recordset(0)

End If
Text1 = rs3(0)
Text2 = rs3(1)
Text3 = rs3(2)
Text4 = rs3(3)
Text5 = rs3(4)
Text6 = rs3(5)
End Sub

Private Sub Command2_Click()

rs3.MoveNext
  If rs3.EOF = True Then
    rs3.MoveLast
   'Command2.Enabled = False
   End If
   
Text1 = rs3(0)
Text2 = rs3(1)
Text3 = rs3(2)
Text4 = rs3(3)
Text5 = rs3(4)
Text6 = rs3(5)
End Sub

Private Sub Form_Load()
Form2.Height = 4410
Form2.Width = 5145
  Set rs3 = New ADODB.Recordset
  Call lj
rs3.Open "select * from 客房信息表", conn, adOpenKeyset


Text1 = rs3(0)
Text2 = rs3(1)
Text3 = rs3(2)
Text4 = rs3(3)
Text5 = rs3(4)
Text6 = rs3(5)
End Sub

⌨️ 快捷键说明

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