?? h_f1_tjspxx2.frm
字號:
TabIndex = 17
Top = 2160
Width = 840
End
Begin VB.Label Label4
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "類型"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 3960
TabIndex = 16
Top = 1200
Width = 420
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "出版社"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 360
TabIndex = 15
Top = 2520
Width = 630
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "作者"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 480
TabIndex = 14
Top = 1920
Width = 420
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "書籍名稱"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 120
TabIndex = 13
Top = 1320
Width = 840
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 4920
Top = 5520
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 4080
Top = 5520
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "f1_tjxxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Call Form_Load
End Sub
Private Sub Command2_Click()
If Text1 = "" Then
msg0 = MsgBox("請填寫書名?", vbOKOnly + vbQuestion, "詢問")
If msg0 = vbOK Then
Text1.SetFocus: Exit Sub
End If
End If
If Text2 = "" Then
msg0 = MsgBox("請填寫作者?", vbOKOnly + vbQuestion, "詢問")
If msg0 = vbOK Then
Text2.SetFocus: Exit Sub
End If
End If
If Text3 = "" Then
msg0 = MsgBox("請填寫出版社?", vbOKOnly + vbQuestion, "詢問")
If msg0 = vbOK Then
Text3.SetFocus: Exit Sub
End If
End If
If Text6 = "" Then
msg0 = MsgBox("請填寫最高價格?", vbOKOnly + vbQuestion, "詢問")
If msg0 = vbOK Then
Text6.SetFocus: Exit Sub
End If
End If
If Combo1.Text <> ("計算機") And Combo1.Text <> ("經濟") And Combo1.Text <> ("數學") And Combo1.Text <> ("外語") And Combo1.Text <> ("文學") And Combo1.Text <> ("其他") Then
MsgBox "類型選擇有誤!", vbOKOnly, "提示"
Combo1 = "計算機"
Combo1.SetFocus: Exit Sub
End If
nr = Text6
For l = 1 To Len(nr)
le = Mid(nr, l, 1)
If Not (Asc(le) = 46 Or (Asc(le) >= 48 And Asc(le) <= 57)) Then
MsgBox "價錢輸入有誤!", vbOKOnly, "提示"
Text6 = ""
Text6.SetFocus: Exit Sub
End If
Next l
'If Adodc1.Recordset.RecordCount = 0 Then
'temp = 0
'Else
'Adodc1.Recordset.MoveLast
'temp = Adodc1.Recordset.Fields("wanted_book_ID")
'End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("name") = Text1.Text 'ok
Adodc1.Recordset.Fields("publisher") = Text3.Text 'ok
Adodc1.Recordset.Fields("author") = Text2.Text 'ok
If Text5 = "" Then
Adodc1.Recordset.Fields("description") = "這家伙很懶,什么也沒寫"
Else
Adodc1.Recordset.Fields("description") = Text5.Text
End If 'ok
If Text4 = "" Then
Adodc1.Recordset.Fields("theme") = "這家伙很懶,什么也沒寫"
Else
Adodc1.Recordset.Fields("theme") = Text4.Text
End If 'ok
Adodc1.Recordset.Fields("kind") = Combo1 'ok
Adodc1.Recordset.Fields("highest_price") = Text6.Text 'ok
Adodc1.Recordset.Fields("user_ID") = yhid
Adodc1.Recordset.Fields("user_credit") = 100 ' 有問題
Adodc1.Recordset.Fields("release_time") = Date + 1
Adodc1.Recordset.Fields("time_limit") = Date + 1 '有問題
Adodc1.Recordset.Fields("handled") = 0
Adodc1.Recordset.Fields("dealed") = 0
If Option1 = True Then
Adodc1.Recordset.Fields("clfs") = 0
Else
Adodc1.Recordset.Fields("clfs") = 1
End If
Adodc1.Recordset.Update
Adodc1.Refresh
Adodc1.Recordset.MoveLast
Text7 = Adodc1.Recordset.Fields("idz")
Adodc1.Recordset.Fields("supplied_book_ID") = Text7.Text
Adodc1.Recordset.Update
Adodc1.Refresh
MsgBox "提交成功,歡迎下次使用", , "結果"
Call Form_Load
Text1.SetFocus
End Sub
Private Sub Command3_Click()
main.Enabled = True
main.Show
Unload Me
End Sub
Private Sub Form_Load()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Combo1 = "選擇書籍類型"
Option1 = True
Adodc1.ConnectionString = cns1 & App.Path & cns2
Adodc1.RecordSource = "select * from wanb"
Adodc1.Refresh
'Adodc1.Recordset.MoveLast
'temp2 = Adodc1.Recordset.Fields("wanted_book_ID") + 1
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -