📄 frmdqbm.frm
字号:
VERSION 5.00
Begin VB.Form frmDQBM
BorderStyle = 3 'Fixed Dialog
Caption = "编码维护---地区编码"
ClientHeight = 1845
ClientLeft = 1095
ClientTop = 330
ClientWidth = 5775
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1845
ScaleWidth = 5775
StartUpPosition = 1 '所有者中心
Begin VB.ListBox ListHelpDqbm
BackColor = &H0080FFFF&
Height = 420
Left = 2160
TabIndex = 20
Top = 840
Visible = 0 'False
Width = 2055
End
Begin VB.Frame Frame1
Enabled = 0 'False
Height = 1095
Left = 120
TabIndex = 16
Top = 120
Width = 5535
Begin VB.TextBox txtFields
DataField = "地区编码"
Height = 285
Index = 0
Left = 2040
TabIndex = 0
Top = 420
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "地区名称"
Height = 285
Index = 1
Left = 2040
TabIndex = 1
Top = 735
Width = 3375
End
Begin VB.Label lblLabels
Caption = "地区编码: **"
Height = 255
Index = 0
Left = 120
TabIndex = 19
Top = 420
Width = 1815
End
Begin VB.Label lblLabels
Caption = "地区名称: **"
Height = 255
Index = 1
Left = 120
TabIndex = 18
Top = 735
Width = 1815
End
Begin VB.Label Label1
Caption = "注意:带**号的字段不能为空,地区编码最多两位"
Height = 255
Left = 240
TabIndex = 17
Top = 0
Width = 4095
End
End
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 5775
TabIndex = 15
Top = 1245
Width = 5775
Begin VB.CommandButton cmdClose
Caption = "关闭(&C)"
Height = 300
Left = 4675
TabIndex = 6
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "刷新(&R)"
Height = 300
Left = 3521
TabIndex = 5
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 300
Left = 1213
TabIndex = 12
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdEdit
Caption = "修改(&E)"
Height = 300
Left = 1213
TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdUpdate
Caption = "保存(&S)"
Height = 300
Left = 59
TabIndex = 11
Top = 0
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdAdd
Caption = "添加(&A)"
Height = 300
Left = 59
TabIndex = 2
Top = 0
Width = 1095
End
Begin VB.CommandButton cmdQuery
Caption = "查询(&Q)"
Height = 300
Left = 2367
TabIndex = 4
Top = 0
Width = 1095
End
End
Begin VB.PictureBox picStatBox
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 5775
TabIndex = 13
Top = 1545
Width = 5775
Begin VB.CommandButton cmdLast
Height = 300
Left = 4545
Picture = "frmDQBM.frx":0000
Style = 1 'Graphical
TabIndex = 10
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdNext
Height = 300
Left = 4200
Picture = "frmDQBM.frx":0192
Style = 1 'Graphical
TabIndex = 9
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdPrevious
Height = 300
Left = 345
Picture = "frmDQBM.frx":0324
Style = 1 'Graphical
TabIndex = 8
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdFirst
Height = 300
Left = 0
Picture = "frmDQBM.frx":04B6
Style = 1 'Graphical
TabIndex = 7
Top = 0
UseMaskColor = -1 'True
Width = 345
End
Begin VB.Label lblStatus
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 285
Left = 690
TabIndex = 14
Top = 0
Width = 3360
End
End
End
Attribute VB_Name = "frmDQBM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'实现地区编码的维护
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
'Dim NullWarnFlag As Boolean
Dim rsdqbm As Recordset
Dim rsDqbm1 As Recordset
'查询
Private Sub cmdQuery_Click()
Me.Hide
frmDqbmcx.Show
End Sub
'保证切换查询界面和维护界面时当前记录的一致性
Private Sub Form_Activate()
If Me.Tag <> "" Then
adoPrimaryRS.MoveFirst
adoPrimaryRS.Find ("地区编码='" & Me.Tag & "'")
End If
End Sub
Private Sub Form_Click()
ListHelpDqbm.Visible = False
End Sub
Private Sub Form_Load()
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select 地区编码,地区名称 from DQBM Order by 地区编码", dblgjx, adOpenStatic, adLockOptimistic
Set rsdqbm = New Recordset
rsdqbm.Open "select 地区编码,地区名称 from DQBM Order by 地区编码", dblgjx, adOpenStatic, adLockOptimistic
Set rsDqbm1 = New Recordset
rsDqbm1.Open "select 地区编码,地区名称 from DQBM Order by 地区编码", dblgjx, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'绑定文本框到数据提供者
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -