教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 互联网资料 >

物资管理信息系统 - 图文(5)

来源:网络收集 时间:2026-04-12
导读: Else Set Myrs = Mydb.OpenRecordset(\* from 登录 where 用户名='\ \ While (Myrs.EOF = False) If Trim(Myrs.Fields(0)) = Trim(Text1) Then MsgBox \用户已经存在,请重新输入用户名!\vbOKOnly + vbExclamation

Else

Set Myrs = Mydb.OpenRecordset(\* from 登录 where 用户名='\& Trim(Text1) & \

While (Myrs.EOF = False)

If Trim(Myrs.Fields(0)) = Trim(Text1) Then

MsgBox \用户已经存在,请重新输入用户名!\vbOKOnly + vbExclamation, \警告\

Text1.SetFocus Text1.Text = \ Text2.Text = \ Text3.Text = \ Exit Sub Else

Myrs.MoveNext End If Wend

End If

If Trim(Text2.Text) <> Trim(Text3.Text) Then

MsgBox \两次输入的密码不一样,请确认!\警告\

Text2.SetFocus Text2.Text = \ Text3.Text = \ Exit Sub Else

If Text2.Text = \

MsgBox \密码不能为空!\警告\ Text2.SetFocus Text2.Text = \ Text3.Text = \ Else

Myrs.AddNew

Myrs.Fields(0) = Trim(Text1.Text) Myrs.Fields(1) = Trim(Text2.Text) Myrs.Update Myrs.Close Mydb.Close

MsgBox \添加用户成功!\信息提示\ Unload Me End If End If

End Sub

Private Sub Command2_Click()

21

Mydb.Close

Myws.Close Unload Me

Project.StatusBar1.Panels(2).Text = \就绪\End Sub

Private Sub Form_Load()

Set Myws = DBEngine.Workspaces(0)

Set Mydb = Myws.OpenDatabase(App.Path + \End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text2.SetFocus End If End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Text3.SetFocus End If

End Sub

Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Command1.SetFocus End If

End Sub 删除用户:

Private Sub Command1_Click()

If (List1.ListCount = 1) Then

MsgBox \删除无效,系统必须有一个用户!\信息提示\

Mydb.Close Unload Me Else

Set Myrs = Mydb.OpenRecordset(\* from 登录 where 用户名='\+ Trim(List1) + \密码='\ If Myrs.EOF = True Then

MsgBox \密码错误,请重新输入密码!\警告 Text1.SetFocus Text1.Text = \ Else

Myrs.Delete

22

Myrs.MoveNext

MsgBox \删除用户成功!\信息提示\ Myrs.Close Mydb.Close Unload Me End If End If End Sub

Private Sub Command2_Click() Mydb.Close Myws.Close

Unload Me

Project.StatusBar1.Panels(2).Text = \就绪\End Sub

Private Sub Form_Load() Dim mrc As Recordset

Set Myws = DBEngine.Workspaces(0)

Set Mydb = Myws.OpenDatabase(App.Path + \ Set mrc = Mydb.OpenRecordset(\登录\ List1.Clear mrc.MoveFirst

Do While Not mrc.EOF

List1.AddItem Trim(mrc.Fields(0)) mrc.MoveNext Loop

List1.ListIndex = 0 mrc.Close End Sub

修改密码:

Private Sub Command1_Click()

Set Myrs = Mydb.OpenRecordset(\* from 登录 where 用户名='\+ Trim(List1) + \密码='\

If Myrs.EOF = True Then

MsgBox \旧密码不正确,请重新输入!\警告\ Text1.SetFocus Text1.Text = \ Text2.Text = \ Text3.Text = \ Exit Sub

End If

If Trim(Text2.Text) <> Trim(Text3.Text) Then

MsgBox \两次输入的密码不一样,请确认!\警告

23

\

Text2.SetFocus Text2.Text = \ Text3.Text = \ Exit Sub

Else

If Text2.Text = \

MsgBox \密码不能为空!\警告\ Text2.SetFocus Text2.Text = \ Text3.Text = \ Else

Myrs.Edit

Myrs.Fields(1) = Trim(Text2.Text) Myrs.Update Myrs.Close

Mydb.Close

MsgBox \密码修改成功!\信息提示\ Unload Me End If End If

End Sub

Private Sub Command2_Click() Mydb.Close Myws.Close Unload Me

Project.StatusBar1.Panels(2).Text = \就绪\End Sub

Private Sub Form_Load() Dim mrc As Recordset

Set Myws = DBEngine.Workspaces(0)

Set Mydb = Myws.OpenDatabase(App.Path + \ Set mrc = Mydb.OpenRecordset(\登录\ List1.Clear mrc.MoveFirst

Do While Not mrc.EOF

List1.AddItem Trim(mrc.Fields(0)) mrc.MoveNext Loop

List1.ListIndex = 0 mrc.Close End Sub

24

添加出库信息:

Private Sub cmdAdd_Click()

Dim count As Integer, i As Integer Dim mrc As Recordset

Dim SQLstring As String, str As String Dim Num As Integer Dim price As Single

If Text1.Text = \

MsgBox \出库单号码不能为空,请填写!\警告\ Text1.SetFocus Exit Sub

End If

While Myrs1.EOF = False

If Myrs1.Fields(0) = Text1.Text Then MsgBox \此出库单号码已经存在,请认真核查!\vbOKOnly + vbExclamation, \警告\

Text1.Text = \ Text2.Text = \ Text3.Text = \ Text4.Text = \ Text5.Text = \ Text6.Text = \

Combo1.ListIndex = 0 Text1.SetFocus Exit Sub Else

Myrs1.MoveNext End If Wend

If Text2.Text = \

MsgBox \发票号码不能为空,请填写!\警告\ Text2.SetFocus Exit Sub

End If

If Text4.Text = \

MsgBox \出库日期不能为空,请填写!\警告\ Text4.SetFocus …… 此处隐藏:1856字,全部文档内容请下载后查看。喜欢就下载吧 ……

物资管理信息系统 - 图文(5).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/442564.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)