?? frmaddnew.frm
字號(hào):
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmAddnew
Caption = "正在添加新書(shū)"
ClientHeight = 4275
ClientLeft = 60
ClientTop = 345
ClientWidth = 8775
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4275
ScaleWidth = 8775
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdClose
Caption = "關(guān)閉"
Height = 495
Left = 6840
TabIndex = 18
Top = 3600
Width = 1335
End
Begin VB.CommandButton cmdSave
Caption = "保存"
Height = 495
Left = 5400
TabIndex = 17
Top = 3600
Width = 1335
End
Begin VB.Frame Frame1
Caption = "書(shū)籍信息"
Height = 3255
Left = 0
TabIndex = 0
Top = 120
Width = 8535
Begin MSComCtl2.DTPicker dtpRigDate
Height = 375
Left = 5040
TabIndex = 16
Top = 1560
Width = 3135
_ExtentX = 5530
_ExtentY = 661
_Version = 393216
Format = 75956225
CurrentDate = 37828
End
Begin VB.TextBox txtWriter
Height = 375
Left = 960
TabIndex = 14
Top = 1560
Width = 3015
End
Begin VB.TextBox txtBookConcern
Height = 375
Left = 5040
TabIndex = 11
Top = 960
Width = 3375
End
Begin VB.TextBox txtPage
Height = 375
Left = 960
TabIndex = 9
Top = 2160
Width = 3015
End
Begin VB.TextBox txtBookPrice
Height = 375
Left = 5040
TabIndex = 8
Top = 2160
Width = 3255
End
Begin VB.ComboBox cboType
Height = 300
Left = 960
TabIndex = 6
Top = 960
Width = 3015
End
Begin VB.TextBox txtBookName
Height = 375
Left = 5040
TabIndex = 3
Top = 360
Width = 3375
End
Begin VB.TextBox txtBookID
BackColor = &H00FFFFFF&
Height = 375
Left = 960
TabIndex = 1
Top = 360
Width = 3015
End
Begin VB.Label Label3
Caption = "登記日期:"
Height = 255
Left = 4200
TabIndex = 15
Top = 1680
Width = 855
End
Begin VB.Label Label2
Caption = "作者姓名:"
Height = 375
Left = 120
TabIndex = 13
Top = 1680
Width = 855
End
Begin VB.Label Label1
Caption = "出版社:"
Height = 255
Left = 4320
TabIndex = 12
Top = 1080
Width = 735
End
Begin VB.Label Label22
Caption = "書(shū)籍頁(yè)碼:"
Height = 255
Left = 120
TabIndex = 10
Top = 2280
Width = 855
End
Begin VB.Label Label26
Caption = "書(shū)籍價(jià)格:"
Height = 255
Left = 4200
TabIndex = 7
Top = 2280
Width = 855
End
Begin VB.Label Label24
Caption = "書(shū)籍類(lèi)別:"
Height = 255
Left = 120
TabIndex = 5
Top = 1080
Width = 855
End
Begin VB.Label Label25
Caption = "書(shū)籍名稱(chēng):"
Height = 255
Left = 4080
TabIndex = 4
Top = 480
Width = 975
End
Begin VB.Label Label27
Caption = "書(shū)籍編號(hào):"
Height = 255
Left = 120
TabIndex = 2
Top = 480
Width = 975
End
End
End
Attribute VB_Name = "FrmAddnew"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdClose_Click()
FrmBookManage.Adodc1.Refresh
Unload Me
End Sub
Private Sub cmdSave_Click()
Set g_rs = g_db.OpenRecordset("SELECT * FROM bookInfo", dbOpenDynaset)
'添加記錄
g_rs.AddNew
'設(shè)置記錄的字段值
g_rs!書(shū)籍編號(hào) = txtBookID.Text
g_rs!書(shū)籍名稱(chēng) = txtBookName.Text
g_rs!類(lèi)別代碼 = Mid(cboType.Text, 1, 1)
g_rs!出版社 = txtBookConcern.Text
g_rs!作者姓名 = txtWriter.Text
g_rs!書(shū)籍價(jià)格 = txtBookPrice.Text
g_rs!書(shū)籍頁(yè)碼 = txtPage.Text
g_rs!登記日期 = dtpRigDate.Value
g_rs!是否借出 = False
' 保存修改!!!
g_rs.Update
Set g_rs = Nothing
MsgBox "新書(shū)添加完畢", vbOKOnly, "提示"
End Sub
Private Sub Form_Load()
dtpRigDate.Value = Date
Set g_rs = g_db.OpenRecordset("bookType", dbOpenTable)
cboType.Clear
If g_rs.RecordCount > 0 Then
g_rs.MoveFirst
Do While Not g_rs.EOF
cboType.AddItem g_rs!類(lèi)別代碼 + "-" + g_rs!書(shū)籍類(lèi)別
g_rs.MoveNext
Loop
End If
Set g_rs = Nothing
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -