库库房管理系统 这是本人运用VB6.0 自制的一个简单的库房管理系统,里面涉及到如何运用VB 打开、修改、保存ACCESS 数据库。鉴于本人为初学者在诸多领域还不是很了解,知识能力有限本系统会存在很多缺陷;望能得到高手的指导、纠正与帮助。现学下相关代码及一些界面设置,希望能对与本人一样的初学者会有一定的帮助。如有疑问请留言或联系QQ:1355044347谢谢! 第一节、 用户登陆界面 用户登录主界面 代码: Private Sub Command1_Click() '“登录”、“确定”按钮 If Command1.Caption = "确定" And Command2.Caption = "取消" Then '如果为“确定”则添加新用户 If Text1.Text = "" Then '提示用户输入用户名 MsgBox "请输入用户名!", , "登录信息提示:" Exit Sub Else ' Dim usename As String '检测用户名是否已经存在 Dim strS As String usename = Trim(Text1.Text) strS = "select * from 用户登录信息表 where 用户名='" & usename & "'" Adodc1.CommandType = adCmdText Adodc1.RecordSource = strS Adodc1.Refresh If Adodc1.Recordset.EOF = False Then MsgBox "您输入的用户已存在!", , "登录提示信息:" Text1.Text = "" Text2.Text = "" Text3.Text = "" Exit Sub End If End If If Text2.Text = "" Then '提示用户密码不能为空 MsgBox "密码不能为空!", , "登录提示信息:" Exit Sub End If If Text3.Text = "" Then MsgBox "请再次输入密码!", , "登录提示信息:" Exit Sub End If If Text2.Text <> Text3.Text Then MsgBox "两次输入的密码不一致,请确认!", , "登录提示信息:" Text2.Text = "" Text3.Text = "" Exit Sub Else Adodc1.Recordset.AddNew '添加新用户 Adodc1.Recordset.Fields("用户名") = Trim(Text1.Text) Adodc1.Recordset.Fields("密码") = Trim(Text2.Text) Adodc1.Recordset.Update MsgBox ("添加新用户成功,现在您可以登陆系统了!") Label3.Visible = False Text3.Visible = False Command1.Caption = "登录" Command2.Caption = "退出" End If Else '“登录”按钮,用户登录 Dim strSno As String Dim strSelect As String strSno = Trim(Text1.Text) '检测用户名是否存在 strSelect = "select 密码 from 用...