?? form1.frm
字號(hào):
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form Form1
Caption = "連接加密的Access數(shù)據(jù)庫(dao)"
ClientHeight = 4275
ClientLeft = 60
ClientTop = 345
ClientWidth = 8115
LinkTopic = "Form1"
ScaleHeight = 4275
ScaleWidth = 8115
StartUpPosition = 1 '所有者中心
Begin VB.ListBox List1
Height = 3120
Left = 5730
TabIndex = 2
Top = 540
Width = 2310
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 390
Left = 5940
TabIndex = 1
Top = 3795
Width = 1935
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "Form1.frx":0000
Height = 3165
Left = 105
OleObjectBlob = "Form1.frx":0014
TabIndex = 0
Top = 510
Width = 5535
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標(biāo)
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 330
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3780
Visible = 0 'False
Width = 1650
End
Begin VB.Label Label1
Caption = "數(shù)據(jù)表內(nèi)容"
Height = 405
Left = 2400
TabIndex = 4
Top = 240
Width = 2340
End
Begin VB.Label Label2
Caption = "數(shù)據(jù)表名稱"
Height = 405
Left = 5820
TabIndex = 3
Top = 240
Width = 2340
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim rs As Recordset
Dim tb As TableDef
Private Sub Form_Load()
Set db = OpenDatabase(App.Path & "\sj.mdb", False, False, ";pwd=111")
Set rs = db.OpenRecordset("sy", dbOpenDynaset)
Set Data1.Recordset = rs
For Each tb In db.TableDefs '選擇所有數(shù)據(jù)表
If Left(tb.Name, 4) <> "MSys" Then List1.AddItem (tb.Name)
Next
List1.Refresh
End Sub
Private Sub List1_Click() '選擇數(shù)據(jù)表
Set rs = db.OpenRecordset(List1.Text, dbOpenDynaset)
Set Data1.Recordset = rs
DBGrid1.Refresh
End Sub
Private Sub Command1_Click()
End
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -