设为首页   |  加入收藏夹 快速导航:  热门文章  |  最新文章  |  梦想博客  
当前位置:编程之家 -> 文章频道 ->vb 
站内搜索:  

VB+Access设计图书管理系统(6)

作者:不详 来源:csdn 整理日期:2007-02-19


  (4) 库房管理子窗体如图27所示。

  VB+Access设计图书管理系统(图二十七)
  图27 库房管理子窗体

  其控件如表6所示。

  表6 库房管理子窗体控件

控 件 类 别 控件Name 控件Text
TextBox Text1 (空)
ComboBox Combo1  
MSFlexGrid MSFlexGrid1  
  
  (5) 查询子窗体如图28所示,其控件如表7所示。

  VB+Access设计图书管理系统(图二十八)
  图28 查询子窗体

  表7 查询子窗体控件

控 件 类 别 控件Name 控件Text
OptionButton Option1 按编号查询
  Option2 按购买日期查询
Label Label1
Label2
Label3
Label4
Label5
Label6
Label7
Label8
Label9
Label10
Combo(0) ComboBox Combo1 (空)
Combo(1) ComboBox Combo1 (空)
Comboy(0) ComboBox Comboy (空)
Comboy(1) ComboBox Comboy (空)
Combom(0) ComboBox Combom (空)
Combom(1) ComboBox Combom (空)
Combod(0) ComboBox Combod (空)
Combod(1) ComboBox Combod (空)
CommandButton Command1  查询
Command2 取消
 
  (6) 用户登录子窗体如图29所示。

  (7) 值班管理子窗体如图30所示,其控件如表8所示。

  VB+Access设计图书管理系统(图二十九) VB+Access设计图书管理系统(图三十)

  图29 用户登录子窗体 图30 值班管理子窗体

  (8) 投诉管理子窗体如图31所示,其控件如表9所示。

  VB+Access设计图书管理系统(图三十)
  图31 投诉管理子窗体

  建立公共模块

  1、显示目录

  建立公共模块可以提高代码的效率,同时使得修改和维护代码都很方便。

  创建公共模块的步骤如下:

  (1) 在菜单中选择“工程”→“添加模块”命令,则出现模块对话框,如图32所示。

  (2) 选择模块图标后,单击“打开”按钮,则模块已经添加到项目中了。默认情况下名为Module1。

  VB+Access设计图书管理系统(图三十二)
  图32 模块对话框

  (3) 在模块中定义整个项目的公共变量。

  Public conn As New ADODB.Connection 标记连接对象

  Public userID As String 标记当前用户ID

  Public userpow As String 标记用户权限

  Public find As Boolean 标记查询

  Public sqlfind As String 查询语句

  Public rs_data1 As New ADODB.Recordset

  Public findok As Boolean

  Public frmdata As Boolean

  Public Const keyenter = 13 enter键的ASCII码

  在主窗体添加完菜单之后,就要为各个子菜单创建事件处理程序。

[1]  [2]  [3]  [4]  [5]  [6]  [7]  [8]  [9]  [10]  [11]