📄 addstu.frm
字号:
VERSION 5.00
Begin VB.Form Addstu
BackColor = &H00808000&
Caption = "Student Options"
ClientHeight = 5700
ClientLeft = 60
ClientTop = 345
ClientWidth = 7065
Icon = "Addstu.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5700
ScaleWidth = 7065
Begin VB.Data Data1
BackColor = &H00C000C0&
Caption = "Student Data"
Connect = "Access"
DatabaseName = "D:\visual basic\Library\initialsc.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 345
Left = 2640
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "stuinfo"
Top = 3600
Width = 3660
End
Begin VB.CommandButton Cmdquit
BackColor = &H00C0C0FF&
Cancel = -1 'True
Caption = "Quit"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5160
Style = 1 'Graphical
TabIndex = 5
Top = 3960
Width = 1215
End
Begin VB.CommandButton Cmddel
BackColor = &H008080FF&
Caption = "Delete"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3960
Style = 1 'Graphical
TabIndex = 4
Top = 3960
Width = 1215
End
Begin VB.CommandButton Cmdadd
BackColor = &H00FF8080&
Caption = "Add Student"
Default = -1 'True
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
Style = 1 'Graphical
TabIndex = 3
Top = 3960
Width = 1335
End
Begin VB.TextBox Txtstuname
Appearance = 0 'Flat
BackColor = &H0000C0C0&
DataField = "tStuName"
DataSource = "Data1"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 495
Left = 2640
TabIndex = 1
Top = 1920
Width = 2055
End
Begin VB.TextBox Tstaddress
Appearance = 0 'Flat
BackColor = &H0000C0C0&
DataField = "mAddress"
DataSource = "Data1"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 495
Left = 2640
TabIndex = 2
Top = 3000
Width = 4215
End
Begin VB.TextBox Txtrno
Appearance = 0 'Flat
BackColor = &H0000C0C0&
DataField = "nRollNo"
DataSource = "Data1"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 495
Left = 2640
TabIndex = 0
Top = 840
Width = 1215
End
Begin VB.Label Label3
BackColor = &H00808000&
Caption = "Address:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 375
Left = 360
TabIndex = 8
Top = 3240
Width = 1215
End
Begin VB.Label Label2
BackColor = &H00808000&
Caption = "Student Name:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 360
TabIndex = 7
Top = 2040
Width = 2055
End
Begin VB.Label Label1
BackColor = &H00808000&
Caption = "Roll No:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 255
Left = 360
TabIndex = 6
Top = 960
Width = 1215
End
End
Attribute VB_Name = "Addstu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdAdd_Click()
general.addstudent
End Sub
Private Sub Cmddel_Click()
On Error GoTo vip
Data1.Recordset.Delete
Data1.Refresh
vip:
If Err.Number = 3200 Then
MsgBox "User is having a book or have some transaction so this user can't be deleted."
End If
End Sub
Private Sub Cmdquit_Click()
Unload Me
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\initialsc.mdb"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -