📄 frmimeitexttoaccess.frm
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain
Caption = "IMEI Records (Text to Access)"
ClientHeight = 5130
ClientLeft = 1110
ClientTop = 345
ClientWidth = 7635
LinkTopic = "Form2"
ScaleHeight = 5130
ScaleWidth = 7635
Begin VB.TextBox txtFindContent
Height = 285
Left = 5280
TabIndex = 23
Text = "[IMEI]='355501000000396'"
Top = 360
Width = 2295
End
Begin VB.CommandButton cmdFind
Caption = "Find"
Height = 300
Left = 6000
TabIndex = 22
Top = 720
Width = 855
End
Begin VB.TextBox txtIMEIDatabaseFileName
Height = 285
Left = 4080
TabIndex = 21
Text = "Click to select Access database"
Top = 2760
Width = 3495
End
Begin VB.CommandButton cmdTextConvertToAccess
Caption = "Convert"
Height = 375
Left = 4080
TabIndex = 19
Top = 120
Width = 975
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3000
Top = 2040
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.TextBox txtIMEISourceName
Height = 285
Left = 240
TabIndex = 17
Text = "click to select text data source"
Top = 2730
Width = 3375
End
Begin MSDBGrid.DBGrid DBGrid1
Bindings = "frmIMEITextToAccess.frx":0000
Height = 1575
Left = 240
OleObjectBlob = "frmIMEITextToAccess.frx":0014
TabIndex = 16
Top = 3120
Width = 7335
End
Begin VB.TextBox txtTime
Height = 285
Left = 1440
TabIndex = 15
Text = "Text1"
Top = 1200
Width = 2055
End
Begin VB.CommandButton cmdLast
Caption = "--->||"
Height = 255
Left = 2760
TabIndex = 13
Top = 1560
Width = 735
End
Begin VB.CommandButton cmdNext
Caption = "----->"
Height = 255
Left = 2160
TabIndex = 12
Top = 1920
Width = 735
End
Begin VB.CommandButton cmdPrevious
Caption = "<-----"
Height = 255
Left = 1080
TabIndex = 11
Top = 1920
Width = 735
End
Begin VB.CommandButton cmdFirst
Caption = "||<---"
Height = 255
Left = 600
TabIndex = 10
Top = 1560
Width = 735
End
Begin VB.TextBox txtIMEI
Height = 285
Left = 1440
TabIndex = 9
Text = "Text1"
Top = 840
Width = 2055
End
Begin VB.TextBox txtBoxNo
Height = 285
Left = 1440
TabIndex = 8
Text = "Text1"
Top = 480
Width = 2055
End
Begin VB.TextBox txtItemNo
Height = 285
Left = 1440
TabIndex = 7
Text = "Text1"
Top = 120
Width = 2055
End
Begin VB.CommandButton cmdClose
Caption = "&Close"
Height = 300
Left = 4080
TabIndex = 6
Top = 2160
Width = 975
End
Begin VB.CommandButton cmdUpdate
Caption = "&Update"
Height = 300
Left = 4080
TabIndex = 5
Top = 1680
Width = 975
End
Begin VB.CommandButton cmdClearAll
Caption = "&ClearAll"
Height = 300
Left = 4080
TabIndex = 4
Top = 1200
Width = 975
End
Begin VB.CommandButton cmdDelete
Caption = "&Delete"
Height = 300
Left = 4080
TabIndex = 3
Top = 720
Width = 975
End
Begin VB.Data Data1
Align = 2 'Align Bottom
Connect = "Access"
DatabaseName = "E:\VB works\Database\IMEIRecords.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Enabled = 0 'False
EOFAction = 2 'Add New
Exclusive = 0 'False
Height = 345
Left = 0
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "IMEIRecords"
Top = 4785
Width = 7635
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Find Content"
Height = 195
Left = 5280
TabIndex = 24
Top = 120
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "IMEI Records Target Database:"
Height = 195
Left = 4080
TabIndex = 20
Top = 2520
Width = 2265
End
Begin VB.Label Label2
Caption = "IMEI Records text source:"
Height = 255
Left = 240
TabIndex = 18
Top = 2520
Width = 2055
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Time:"
Height = 195
Left = 360
TabIndex = 14
Top = 1200
Width = 390
End
Begin VB.Label lblLabels
AutoSize = -1 'True
Caption = "IMEI:"
Height = 195
Index = 2
Left = 360
TabIndex = 2
Top = 825
Width = 375
End
Begin VB.Label lblLabels
AutoSize = -1 'True
Caption = "Box No:"
Height = 195
Index = 1
Left = 360
TabIndex = 1
Top = 495
Width = 570
End
Begin VB.Label lblLabels
AutoSize = -1 'True
Caption = "ITem No:"
Height = 195
Index = 0
Left = 360
TabIndex = 0
Top = 180
Width = 660
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public lRecordCounter As Long
Private Sub cmdClearAll_Click()
Dim l As Long
Dim lTotal As Long
Data1.Recordset.MoveLast
lTotal = Data1.Recordset.RecordCount
Data1.Recordset.MoveFirst
Do While Data1.Recordset.EOF = False
Data1.Recordset.Delete
Data1.Recordset.MoveNext
Loop
End Sub
'Private Sub cmdAdd_Click()
' Data1.Recordset.AddNew
'End Sub
Private Sub cmdDelete_Click()
'this may produce an error if you delete the last
'record or the only record in the recordset
Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub
Private Sub cmdFind_Click()
Data1.Recordset.FindFirst txtFindContent.Text
If Data1.Recordset.NoMatch = False Then
MsgBox "There are a same record already!"
End If
End Sub
Private Sub cmdFirst_Click()
Data1.Recordset.MoveFirst
End Sub
Private Sub cmdLast_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -