📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 6075
ClientLeft = 60
ClientTop = 345
ClientWidth = 5520
LinkTopic = "Form1"
ScaleHeight = 6075
ScaleWidth = 5520
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text2
DataSource = "Data1"
Height = 495
Left = 600
TabIndex = 2
Text = "Text2"
Top = 2280
Width = 1935
End
Begin VB.TextBox Text1
Height = 1095
Left = 600
TabIndex = 1
Text = "Text1"
Top = 3600
Width = 2535
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 735
Left = 3600
TabIndex = 0
Top = 2640
Width = 1575
End
Begin VB.Data Data2
Caption = "Data2"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\Administrator\My Documents\新建文件夹\bb.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 735
Left = 480
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 960
Width = 3135
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\Administrator\My Documents\新建文件夹\aa.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 735
Left = 360
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 120
Width = 3375
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
sql = "select * from no1 where a = 'key2'"
Data1.RecordSource = sql
Data1.Refresh
Dim sql2 As String
sql2 = "select * from no2 where a= 'key2'"
Data2.RecordSource = sql2
Data2.Refresh
Text1.Text = CDbl(Data1.Recordset.Fields(1)) + CDbl(Data2.Recordset.Fields(1))
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -