毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 课程设计 >> 正文

VB+Access图书管理系统 第5页

更新时间:2008-1-17:  来源:毕业论文

VB+Access图书管理系统 第5页

Form9.Show

End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)

If Not Adodc1.Recordset.EOF And Adodc1.Recordset.EOF Then

book_num = DataGrid1.Columns(0).CellValue(DataGrid1.Bookmark)

panduan = DataGrid1.Columns(7).CellValue(DataGrid1.Bookmark)

End If

End Sub

 

Private Sub Form_Load()

Dim i As Integer

Dim sql As String

Combo1.Clear

Adodc2.Recordset.MoveFirst

For i = 0 To Adodc2.Recordset.RecordCount - 1

Combo1.AddItem Adodc2.Recordset.Fields(0).Value

Adodc2.Recordset.MoveNext

Next

Combo1.ListIndex = 0

End Sub

 

窗体名:Form5

代码:

Private Sub Command1_Click()

On Error GoTo command1error

Command2.Enabled = False

Command3.Enabled = False

Command4.Enabled = True

Command5.Enabled = True

DataGrid1.AllowAddNew = True

DataGrid1.AllowUpdate = True

Exit Sub

commanderror:

MsgBox Err.Description

End Sub

 

Private Sub Command2_Click()

On Error GoTo Command2

Command1.Enabled = False

Command2.Enabled = False

Command3.Enabled = False

Command4.Enabled = True

Command5.Enabled = True

DataGrid1.AllowUpdate = True

Command2:

If Err.Number <> 0 Then

MsgBox Err.Description

End If

End Sub

 

Private Sub Command3_Click()

Dim answer As String

On Error GoTo command3error

answer = MsgBox("确定要删除吗?", vbYesNo, "")

If answer = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

If Adodc1.Recordset.EOF = True Then

Adodc1.Recordset.MoveLast

End If

DataGrid1.Refresh

MsgBox "成功删除!", vbOKOnly + vbExclamation, ""

DataGrid1.AllowDelete = False

Else

Exit Sub

End If

command3error:

If Err.Number <> 0 Then

MsgBox Err.Description

End If

End Sub

 

Private Sub Command4_Click()

If Not IsNull(DataGrid1.BackColor) Then

DataGrid1.Refresh

End If

Command1.Enabled = True

Command2.Enabled = True

Command3.Enabled = True

Command4.Enabled = False

Command5.Enabled = False

MsgBox "操作成功!", vbOKOnly + vbExclamation, ""

End Sub

 

Private Sub Command5_Click()

DataGrid1.Refresh

DataGrid1.AllowAddNew = False

DataGrid1.AllowUpdate = False

Command2.Enabled = True

Command1.Enabled = True

Command3.Enabled = True

Command4.Enabled = False

Command5.Enabled = False

End Sub

 

Private Sub Form_Load()

Command4.Enabled = False

DataGrid1.AllowAddNew = False

DataGrid1.AllowDelete = False

DataGrid1.AllowUpdate = False

If userpow = "guest" Then

Frame2.Enabled = False

End If

Exit Sub

loaderror:

MsgBox Err.Description

End Sub

 

窗体名:Form6

代码:

Private Sub Command1_Click()

On Error GoTo commanderror

Command2.Enabled = False

Command3.Enabled = False

Command1.Enabled = False

Command4.Enabled = True

Command5.Enabled = True

DataGrid1.AllowAddNew = True

DataGrid1.AllowUpdate = True

Exit Sub

command1error:

MsgBox Err.Description

End Sub

 

Private Sub Command2_Click()

On Error GoTo Command2

Command1.Enabled = False

Command3.Enabled = False

Command2.Enabled = False

Command4.Enabled = True

Command5.Enabled = True

Command1.Enabled = True

DataGrid1.AllowUpdate = True

Command2:

If Error.Number <> 0 Then

MsgBox Err.Description

End If

End Sub

 

Private Sub Command3_Click()

Dim answer As String

On Error GoTo command3error

answer = MsgBox("确定要删除吗:", vbYesNo, "")

If answer = vbYes Then

Adodc1.Recordset.Delete

Adodc1.Recordset.MoveNext

End If

DataGrid1.Refresh

MsgBox "成功删除!", vbOKOnly + vbExclamation, ""

DataGrid1.AllowDelete = False

Else

 Exit Sub

command3error:

 If Err.Number <> 0 Then

 MsgBox Err.Description

 End If

End Sub

 

Private Sub Command4_Click()

If Not IsNull(DataGrid1.Bookmark) Then

DataGrid1.Refresh

End If

Command1.Enabled = True

Command2.Enabled = True

Command3.Enabled = True

Command4.Enabled = False

Command5.Enabled = False

DataGrid1.AllowAddNew = False

DataGrid1.AllowUpdate = False

MsgBox "操作成功!", vbOKOnly + vbExclamation, ""

End Sub

 

Private Sub Command5_Click()

DataGrid1.Refresh

DataGrid1.AllowAddNew = False

DataGrid1.AllowUpdate = False

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页

VB+Access图书管理系统 第5页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。