?? frmreader1.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.Form frmReader1
Caption = "讀者信息"
ClientHeight = 5820
ClientLeft = 60
ClientTop = 450
ClientWidth = 8520
LinkTopic = "Form1"
ScaleHeight = 5820
ScaleWidth = 8520
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdExit
Caption = "返回(&X)"
Height = 375
Left = 3840
TabIndex = 14
Top = 5160
Width = 855
End
Begin VB.CommandButton cmd
Caption = "保存(&S)"
Height = 375
Left = 2520
TabIndex = 13
Top = 5160
Width = 855
End
Begin VB.Frame Frame1
Caption = "讀者信息"
Height = 4815
Left = 120
TabIndex = 0
Top = 240
Width = 7935
Begin VB.TextBox Text1
Height = 270
Index = 2
Left = 3720
TabIndex = 18
Top = 720
Width = 3255
End
Begin VB.TextBox Text1
Height = 270
Index = 1
Left = 3720
TabIndex = 17
Top = 360
Width = 3255
End
Begin VB.TextBox Text1
Height = 270
Index = 0
Left = 1080
TabIndex = 16
Top = 720
Width = 1695
End
Begin VB.Frame Frame3
Caption = "照片"
Height = 3375
Left = 3000
TabIndex = 10
Top = 1320
Width = 4695
Begin VB.CommandButton Command1
Caption = "添加照片"
Height = 375
Left = 3120
TabIndex = 12
Top = 1320
Width = 975
End
Begin MSComDlg.CommonDialog cdlg
Left = 3120
Top = 1920
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 495
Left = 3120
TabIndex = 11
Top = 720
Width = 255
End
Begin VB.Image Image1
Height = 3015
Left = 120
Stretch = -1 'True
Top = 240
Width = 2775
End
End
Begin VB.Frame Frame2
Caption = "性別"
Height = 1455
Left = 360
TabIndex = 7
Top = 2280
Width = 1575
Begin VB.OptionButton Option2
Caption = "女"
Height = 255
Left = 240
TabIndex = 9
Top = 840
Width = 975
End
Begin VB.OptionButton Option1
Caption = "男"
Height = 255
Left = 240
TabIndex = 8
Top = 360
Width = 975
End
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1080
TabIndex = 2
Top = 360
Width = 1695
End
Begin VB.Label Label6
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1080
TabIndex = 15
Top = 1200
Width = 1695
End
Begin VB.Label Label5
Caption = "借書數量"
Height = 255
Left = 240
TabIndex = 6
Top = 1200
Width = 735
End
Begin VB.Label Label4
Caption = "出生時間"
Height = 255
Left = 3000
TabIndex = 5
Top = 840
Width = 735
End
Begin VB.Label Label3
Caption = "姓 名"
Height = 255
Left = 240
TabIndex = 4
Top = 840
Width = 735
End
Begin VB.Label Label2
Caption = "專業名"
Height = 255
Left = 3000
TabIndex = 3
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "借書證號"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 855
End
End
End
Attribute VB_Name = "frmReader1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public mrc As ADODB.Recordset
Public txtSQL As String
Public imagechang As Integer
Public jszh As String
Private Sub Check1_Click()
If Check1.Value = 0 Then
Image1.Picture = Nothing
Command1.Visible = False
Else
If flagadd = 1 Or flagadd = 2 Then
Command1.Visible = True
End If
End If
End Sub
Private Sub cmd_Click()
Dim iCount As Integer
Dim sMeg As String
Dim mrcc As ADODB.Recordset
Dim msgtext As String
Dim xm, zym As String
Dim jszh1 As String
Dim xb As Integer
Dim cssj As Date
Dim cnn As ADODB.Connection
Dim jss As Integer
Dim cmddele As New ADODB.Command
Select Case flagadd
Case 1
xb = 0
If Trim(Combo1.Text & " ") = "" Then
sMeg = "借書證號"
End If
For iCount = 0 To 2
If Trim(Text1(iCount) & " ") = "" Then
Select Case iCount
Case 0
sMeg = "姓名"
Case 1
sMeg = "專業名"
End Select
sMeg = sMeg & "不能為空!"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"
Text1(iCount).SetFocus
Exit Sub
End If
Next iCount
If Not IsDate(Trim(Text1(2))) Then
MsgBox "請輸入日期!", vbOKOnly + vbExclamation, "警告"
Exit Sub
Else
Text1(2) = Format(Text1(2), "yyyy-mm-dd")
End If
jszh = Combo1.Text
Combo1.AddItem Trim(jszh)
xm = Text1(0).Text
zym = Text1(1).Text
cssj = CDate(Text1(2).Text)
If Option2 Then
xb = 1
End If
txtSQL = "select * from zzyxs where 借書證號='" & Trim(Combo1.Text) & "'"
Set mrcc = ExecuteSQL(txtSQL, msgtext)
If mrcc.EOF = False Then
MsgBox "此讀者的借書證號已存在!", vbOKOnly + vbExclamation, "警告"
Combo1.SetFocus
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -