云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > VB+Access设计图书管理系统

VB+Access设计图书管理系统

  • 62 次阅读
  • 3 次下载
  • 2025/6/23 16:14:19

DataGrid1.AllowUpdate = True ' 设定DataGrid可以增加记录 Else

If Not IsNull(DataGrid1.Bookmark) Then

If Not IsDate(Trim(DataGrid1.Columns(\值班开始日期\

MsgBox \请按照格式yyyy-mm-dd输入值班开始日期\Exit Sub End If If Not IsDate(Trim(DataGrid1.Columns(\值班开始时间\MsgBox \请按照格式hh-mm输入值班开始时间\Exit Sub End If If Not IsDate(Trim(DataGrid1.Columns(\值班截止日期\MsgBox \请按照格式yyyy-mm-dd输入值班截止日期\Exit Sub End If If Not IsDate(Trim(DataGrid1.Columns(\值班截止时间\MsgBox \请按照格式hh-mm输入值班截止时间\Exit Sub End If If Trim(DataGrid1.Columns(\值班人\MsgBox \值班人不能为空!\Exit Sub

End If

rs_zhiban.Update

MsgBox \添加信息成功!\

DataGrid1.AllowAddNew = False

DataGrid1.AllowUpdate = False Else MsgBox \没有添加信息!\End If cmdadd.Caption = \新增记录\cmddel.Enabled = True End If adderror: If Err.Number <> 0 Then MsgBox Err.Description End If End Sub Private Sub cmdcancel_Click() Unload Me MDIForm1.Show End Sub Private Sub cmddel_Click() Dim answer As String

On Error GoTo delerror

answer = MsgBox(\确定要删除吗?\

If answer = vbYes Then

DataGrid1.AllowDelete = True

rs_zhiban.Delete rs_zhiban.Update DataGrid1.Refresh MsgBox \成功删除!\DataGrid1.AllowDelete = False Else Exit Sub End If delerror: If Err.Number <> 0 Then MsgBox Err.Description End If End Sub Private Sub Form_Load() Dim sql As String On Error GoTo loaderror sql = \值班管理\rs_zhiban.CursorLocation = adUseClient

rs_zhiban.Open sql, conn, adOpenKeyset, adLockPessimistic ' 打开数据库

' 设定DataGrid控件属性

DataGrid1.AllowAddNew = False ' 不可增加

DataGrid1.AllowDelete = False ' 不可删除

DataGrid1.AllowUpdate = False

Set DataGrid1.DataSource = rs_zhiban

Exit Sub

loaderror:

MsgBox Err.Description

End Sub

Private Sub Form_Unload(Cancel As Integer)

Set DataGrid1.DataSource = Nothing

rs_zhiban.Close

End Sub

(8) 投诉管理子窗体代码

投诉管理子窗体是为了对人员进行更好的管理而设置的,可以向其添加投诉的对象、时间和内容等。投诉管理运行后的子窗体如图45所示。

搜索更多关于: VB+Access设计图书管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

DataGrid1.AllowUpdate = True ' 设定DataGrid可以增加记录 Else If Not IsNull(DataGrid1.Bookmark) Then If Not IsDate(Trim(DataGrid1.Columns(\值班开始日期\ MsgBox \请按照格式yyyy-mm-dd输入值班开始日期\Exit Sub End If If Not IsDate(Tri

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com