【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:B家庭成员信息.frm绩等信息,祝愿广大网友取得需要的信息,参考学习。
VERSION 5.00
Begin VB.Form frmMember
Caption = "成员信息"
ClientHeight = 4020
ClientLeft = 4605
ClientTop = 3075
ClientWidth = 8580
LinkTopic = "Form1"
ScaleHeight = 4020
ScaleWidth = 8580
Begin VB.Frame FrameList
Caption = "学生家庭列表"
Height = 3495
Left = 5880
TabIndex = 18
Top = 120
Width = 2115
Begin VB.ComboBox CboStu
Height = 315
Left = 120
TabIndex = 20
Top = 480
Width = 1815
End
Begin VB.ListBox ListStu
Height = 1680
ItemData = "B家庭成员信息.frx":0000
Left = 120
List = "B家庭成员信息.frx":0002
TabIndex = 19
Top = 1440
Width = 1755
End
Begin VB.Label LblNotes
Height = 615
Left = 120
TabIndex = 22
Top = 840
Width = 1815
End
Begin VB.Label Label9
Caption = "选择学生:"
Height = 255
Left = 240
TabIndex = 21
Top = 240
Width = 1095
End
End
Begin VB.Frame FrameInfo
Caption = "成员信息"
Height = 3495
Left = 120
TabIndex = 0
Top = 120
Width = 5655
Begin VB.ComboBox CboSelect
Height = 315
Left = 3960
TabIndex = 12
Top = 240
Width = 1575
End
Begin VB.TextBox txtItem
Height = 375
Index = 3
Left = 1080
MaxLength = 50
TabIndex = 11
Top = 1560
Width = 2535
End
Begin VB.TextBox txtItem
Height = 375
Index = 2
Left = 3960
MaxLength = 18
TabIndex = 10
Top = 840
Width = 1575
End
Begin VB.Frame Frame2
Height = 885
Index = 0
Left = 120
TabIndex = 3
Top = 2160
Width = 5415
Begin VB.CommandButton CmdSave
BackColor = &H00C0C0C0&
Caption = "保存"
Enabled = 0 'False
Height = 480
Left = 2619
Style = 1 'Graphical
TabIndex = 9
Top = 255
Width = 800
End
Begin VB.CommandButton CmdAdd
BackColor = &H00C0C0C0&
Caption = "添加"
Height = 480
Left = 180
Style = 1 'Graphical
TabIndex = 8
Top = 240
Width = 800
End
Begin VB.CommandButton CmdDelete
BackColor = &H00C0C0C0&
Caption = "删除"
Height = 480
Left = 1806
Style = 1 'Graphical
TabIndex = 7
Top = 255
Width = 800
End
Begin VB.CommandButton CmdCancel
BackColor = &H00C0C0C0&
Caption = "取消"
Height = 480
Left = 3432
Style = 1 'Graphical
TabIndex = 6
Top = 255
Width = 800
End
Begin VB.CommandButton CmdExit
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 480
Left = 4245
Style = 1 'Graphical
TabIndex = 5
Top = 255
Width = 800
End
Begin VB.CommandButton CmdModify
BackColor = &H00C0C0C0&
Caption = "修改"
Height = 480
Left = 993
Style = 1 'Graphical
TabIndex = 4
Top = 255
Width = 800
End
End
Begin VB.TextBox txtItem
Height = 375
Index = 0
Left = 1080
MaxLength = 50
TabIndex = 2
Top = 240
Width = 1695
End
Begin VB.TextBox txtItem
Height = 375
Index = 1
Left = 1080
MaxLength = 50
TabIndex = 1
Top = 960
Width = 1695
End
Begin VB.Label Label5
Caption = "联系方式:"
Height = 255
Index = 2
Left = 120
TabIndex = 17
Top = 1680
Width = 1335
End
Begin VB.Label Label7
Caption = "职务:"
Height = 375
Index = 1
Left = 240
TabIndex = 16
Top = 960
Width = 735
End
Begin VB.Label Label6
Caption = "所在单位:"
Height = 375
Index = 1
Left = 2880
TabIndex = 15
Top = 960
Width = 975
End
Begin VB.Label Label5
Caption = "关系:"
Height = 255
Index = 1
Left = 3240
TabIndex = 14
Top = 240
Width = 615
End
Begin VB.Label Label5
Caption = "成员:"
Height = 255
Index = 0
Left = 120
TabIndex = 13
Top = 360
Width = 1215
End
End
End
Attribute VB_Name = "frmMember"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As ADODB.Recordset
Dim SQLStr As String
Dim msg As String
Dim Index As Integer
Dim strClassNo As String
Dim flag As String '判断是新增加的记录还是修改记录
Private Sub FixData()
Dim StNumber As String
Dim memberName As String
'显示学生具体信息
If CboStu.ListCount > 0 And ListStu.ListCount > 0 Then
StNumber = Left(Trim(CboStu.Text), 8)
memberName = Left(Trim(ListStu.Text), InStr(Trim(ListStu.Text), ":") - 1)
Else
Exit Sub
End If
LblNotes.Caption = StNumber & "号学生成员信息"
'查询数据
rs.MoveFirst
rs.Find ("nameM='" & memberName & "'")
'显示数据
txtItem(0).Text = Trim(rs.Fields("nameM"))
txtItem(1).Text = Trim(rs.Fields("jobs"))
txtItem(2).Text = Trim(rs.Fields("company"))
txtItem(3).Text = Trim(rs.Fields("contact"))
CboSelect.Text = Trim(rs.Fields("relation"))
'控件可用性
For Index = 0 To 3
txtItem(Index).Enabled = False
Next Index
CboSelect.Enabled = False
End Sub
Private Function CheckData() As Boolean
'检查数据的合法性
Dim rst As ADODB.Recordset
'检查数据非空性
If Trim(txtItem(0).Text) = "" Then
MsgBox ("成员名称不能空;")
CheckData = False
Exit Function
End If
'检
上一篇:
B学籍报表.frm
下一篇:
:现在要收费的搜猫9.0正式版现在免费分享给大家