?? frmgridparty.frm
字號:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
Begin VB.Form frmPartyModify
BorderStyle = 3 'Fixed Dialog
Caption = "學(xué)生黨建信息全屏修改"
ClientHeight = 6540
ClientLeft = 45
ClientTop = 615
ClientWidth = 9510
Icon = "frmGridParty.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6540
ScaleWidth = 9510
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin MSDBGrid.DBGrid dbgrdStudent
Bindings = "frmGridParty.frx":030A
Height = 5955
Left = 30
OleObjectBlob = "frmGridParty.frx":031A
TabIndex = 0
Top = 60
Width = 9450
End
Begin ComctlLib.StatusBar SBar1
Align = 2 'Align Bottom
Height = 465
Left = 0
TabIndex = 2
Top = 6075
Width = 9510
_ExtentX = 16775
_ExtentY = 820
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 1
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 16722
Picture = "frmGridParty.frx":0CCD
Object.Tag = ""
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\Program Files\DevStudio\VB\學(xué)生數(shù)據(jù)庫\Student.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 375
Left = 840
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "ZBQKB"
Top = 2280
Visible = 0 'False
Width = 1455
End
Begin VB.CommandButton cmdExit
Caption = "退出"
BeginProperty Font
Name = "宋體"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 6900
TabIndex = 1
Top = 5130
Width = 1815
End
Begin VB.Line Line1
BorderColor = &H00000000&
X1 = 30
X2 = 2160
Y1 = 0
Y2 = 0
End
Begin VB.Menu MNUFILE
Caption = "【文件&F】"
Begin VB.Menu MNUEXIT
Caption = "退出[&X]"
End
End
Begin VB.Menu MNUCHA
Caption = "【功能切換&C】"
Begin VB.Menu MNUSQU
Caption = "記錄查詢[&S]"
End
Begin VB.Menu MNU21
Caption = "-"
End
Begin VB.Menu MNUCOUNT
Caption = "信息統(tǒng)計[&C]"
End
Begin VB.Menu MNU22
Caption = "-"
End
Begin VB.Menu MNUINPUT
Caption = "數(shù)據(jù)輸入[&I]"
End
End
Begin VB.Menu MNULOC
Caption = "【定位&L】"
Begin VB.Menu MNUXH
Caption = "學(xué)號定位[&L]"
End
End
Begin VB.Menu MNUHELP
Caption = "【幫助&H】"
Begin VB.Menu MNUNOTE
Caption = "使用說明[&N]"
End
End
End
Attribute VB_Name = "frmPartyModify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim msSortCol As String
Dim mbCtrlKey As Integer
Dim I As Integer
Private Sub cmdExit_Click()
On Error Resume Next
Unload Me
'Frmstart.Show
End Sub
Private Sub dbgrdStudent_BeforeColUpdate(ByVal ColIndex As Integer, OldValue As Variant, Cancel As Integer)
On Error Resume Next
If MsgBox("您同意改變嗎!", vbQuestion + vbOKCancel, "提示") = vbOK Then
Cancel = 0
Else
Cancel = 1
End If
End Sub
Private Sub dbgrdStudent_BeforeDelete(Cancel As Integer)
On Error Resume Next
If MsgBox("您同意刪除嗎!", vbQuestion + vbOKCancel, "提示") = vbOK Then
Cancel = 0
SBar1.Panels(1).Text = "共有" & I - 1 & "條記錄!"
I = I - 1
Else
Cancel = 1
End If
End Sub
Private Sub dbgrdStudent_HeadClick(ByVal ColIndex As Integer)
If Data1.RecordsetType = vbRSTypeTable Then Exit Sub
If mbCtrlKey Then
msSortCol = Data1.Recordset(ColIndex).Name & " desc"
mbCtrlKey = 0
Else
msSortCol = Data1.Recordset(ColIndex).Name
End If
sort
msSortCol = gsNUL_STR
End Sub
Private Sub Form_Load()
On Error Resume Next
Dim sqlForModify As String
Dim recForModify As Recordset
sqlForModify = "select xh as 學(xué)號,xm as 姓名,csny as 出生年月,mz as 民族,yx as 院系,nj as 年級,sy as 生源,xl as 學(xué)歷,tgsj as 通過時間,zzsj as 轉(zhuǎn)正時間,zdsj as 轉(zhuǎn)檔時間,zddd as 轉(zhuǎn)檔地點 from party"
Set recForModify = Dbstudent.OpenRecordset(sqlForModify, dbOpenDynaset)
Set Data1.Recordset = recForModify
Line1.X1 = 0
Line1.X2 = frmPartyModify.Width
recForModify.MoveLast
recForModify.MoveFirst
SBar1.Panels(1).Text = "共有" & recForModify.RecordCount & "條記錄!" & " 【定位光標(biāo)于某單元格內(nèi)可進行修改,單擊列頭可以排序】"
I = recForModify.RecordCount
DBGrdstudent.Refresh
Data1.Refresh
DBGrdstudent.SetFocus
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Unload Me
End Sub
Private Sub MNUCOUNT_Click()
frmPartyCount.Show 1
End Sub
Private Sub MNUEXIT_Click()
On Error Resume Next
Unload Me
'Frmstart.Show
End Sub
Private Sub MNUINPUT_Click()
On Error Resume Next
frmPartyInput.Show 1
End Sub
Private Sub MNUNOTE_Click()
Dim TTT As String
Dim X
TTT = App.Path + "\help\djxg.txt"
X = Shell("Notepad " + TTT, 1)
End Sub
Private Sub MNUSQU_Click()
frmQueryParty.Show 1
End Sub
Private Sub MNUXH_Click()
On Error Resume Next
FRMDW.Label1.Caption = "黨員學(xué)號定位"
FRMDW.Show 1
End Sub
Private Sub sort()
On Error GoTo sorterr
Dim recRecordset1 As Recordset, recRecordset2 As Recordset
Dim SortStr As String
Set recRecordset1 = Data1.Recordset 'copy the recordset
SortStr = msSortCol
recRecordset1.sort = SortStr
Set recRecordset2 = recRecordset1.OpenRecordset(recRecordset1.Type)
Set Data1.Recordset = recRecordset2
Screen.MousePointer = 0
Exit Sub
sorterr:
Screen.MousePointer = 0
On Error Resume Next
Exit Sub
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -