📄 frmmodi.frm
字号:
VERSION 5.00
Begin VB.Form frmModiy
Caption = "记录的详细数据"
ClientHeight = 7260
ClientLeft = 60
ClientTop = 345
ClientWidth = 8055
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmModi.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7260
ScaleWidth = 8055
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "退出"
Height = 396
Left = 6492
TabIndex = 17
Top = 648
Width = 1215
End
Begin VB.TextBox txtReson
Height = 372
Left = 1320
TabIndex = 4
Top = 1140
Width = 4968
End
Begin VB.TextBox txtCarStyle
Height = 375
Left = 4716
TabIndex = 1
Top = 132
Width = 1560
End
Begin VB.TextBox txtCarNumber
Height = 375
Left = 1320
TabIndex = 0
Top = 132
Width = 2652
End
Begin VB.TextBox txtMotorMan
Height = 375
Left = 4716
TabIndex = 3
Top = 636
Width = 1560
End
Begin VB.TextBox txtCarMan
Height = 375
Left = 1320
TabIndex = 2
Top = 636
Width = 2652
End
Begin VB.CommandButton cmdOk
Caption = "保存"
Default = -1 'True
Height = 396
Left = 6492
TabIndex = 5
Top = 132
Width = 1215
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "违章原因:"
Height = 216
Left = 312
TabIndex = 16
Top = 1140
Width = 1080
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "车型:"
Height = 216
Left = 4092
TabIndex = 15
Top = 132
Width = 648
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "车牌号码:"
Height = 216
Left = 312
TabIndex = 14
Top = 132
Width = 1080
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "姓名:"
Height = 216
Left = 4092
TabIndex = 13
Top = 636
Width = 648
End
Begin VB.Label labDirection
BorderStyle = 1 'Fixed Single
Height = 372
Left = 4716
TabIndex = 12
Top = 1644
Width = 2976
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "方向:"
Height = 216
Left = 4092
TabIndex = 11
Top = 1644
Width = 648
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
Height = 4452
Left = 360
Top = 2724
Width = 7368
End
Begin VB.Label labTime
BorderStyle = 1 'Fixed Single
Height = 372
Left = 1320
TabIndex = 10
Top = 1644
Width = 2652
End
Begin VB.Label labPost
BorderStyle = 1 'Fixed Single
Height = 372
Left = 1320
TabIndex = 9
Top = 2148
Width = 6384
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "违章时间:"
Height = 216
Left = 312
TabIndex = 8
Top = 1644
Width = 1080
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "违章地点:"
Height = 216
Left = 312
TabIndex = 7
Top = 2148
Width = 972
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "车主名称:"
Height = 216
Left = 312
TabIndex = 6
Top = 636
Width = 1080
End
End
Attribute VB_Name = "frmModiy"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim f_Rs As Recordset
Dim f_bChanged As Boolean
Private Sub cmdCancel_Click()
Unload Me
End Sub
'存档,至少要车牌号码
Private Sub cmdOK_Click()
Dim nYesNo As Integer
txtCarNumber.Text = Trim(txtCarNumber.Text)
txtCarStyle.Text = Trim(txtCarStyle.Text)
txtCarMan.Text = Trim(txtCarMan.Text)
txtMotorMan.Text = Trim(txtMotorMan.Text)
txtReson.Text = Trim(txtReson.Text)
If txtCarNumber.Text = "" Then
MsgBox "您必须确定车牌号码!", , "缺少数据"
txtCarNumber.SetFocus
Else
f_Rs.Edit
f_Rs!fldCarNumber = txtCarNumber.Text
f_Rs!fldCarMan = txtCarMan.Text
f_Rs!fldMotorMan = txtMotorMan.Text
f_Rs!fldCarStyle = txtCarStyle.Text
f_Rs!fldReson = txtReson.Text
f_Rs.Update
f_bChanged = False
End If
End Sub
Private Sub Form_Load()
Set f_Rs = g_myDB.OpenRecordset("Select * from tabCaptureRec where fldID = " & Format(g_lCurRecID))
txtCarNumber.Text = Format(f_Rs!fldCarNumber)
txtCarMan.Text = Format(f_Rs!fldCarMan)
txtMotorMan.Text = Format(f_Rs!fldMotorMan)
txtCarStyle.Text = Format(f_Rs!fldCarStyle)
txtReson.Text = Format(f_Rs!fldReson)
labPost.Caption = Format(f_Rs!fldPostName)
labDirection.Caption = Format(f_Rs!fldDirection)
labTime.Caption = Format(f_Rs!fldCapDate, "Long Date") & Format(f_Rs!fldCapTime, "Long Time")
' Image1.Picture = LoadPicture(GetAppPath & "Jpg\" & f_Rs!fldJpgFile)
f_bChanged = False
End Sub
Private Sub Form_Resize()
Image1.Width = 498 * Screen.TwipsPerPixelX
Image1.Height = 288 * Screen.TwipsPerPixelY
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim nYesNo As Integer
If f_bChanged = True Then
nYesNo = MsgBox("记录数据已被改动,存盘吗?", vbQuestion + vbYesNo)
If nYesNo = vbYes Then
txtCarNumber.Text = Trim(txtCarNumber.Text)
txtCarStyle.Text = Trim(txtCarStyle.Text)
txtCarMan.Text = Trim(txtCarMan.Text)
txtMotorMan.Text = Trim(txtMotorMan.Text)
txtReson.Text = Trim(txtReson.Text)
If txtCarNumber.Text = "" Then
MsgBox "您必须确定车牌号码!", , "缺少数据"
txtCarNumber.SetFocus
Cancel = True
Exit Sub
Else
f_Rs.Edit
f_Rs!fldCarNumber = txtCarNumber.Text
f_Rs!fldCarMan = txtCarMan.Text
f_Rs!fldMotorMan = txtMotorMan.Text
f_Rs!fldCarStyle = txtCarStyle.Text
f_Rs!fldReson = txtReson.Text
f_Rs.Update
End If
End If
End If
f_Rs.Close
End Sub
Private Sub txtCarMan_Change()
f_bChanged = True
End Sub
Private Sub txtCarNumber_Change()
f_bChanged = True
End Sub
Private Sub txtCarStyle_Change()
f_bChanged = True
End Sub
Private Sub txtMotorMan_Change()
f_bChanged = True
End Sub
Private Sub txtReson_Change()
f_bChanged = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -