| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 435 人关注过本帖
标题:[求助]请斑竹和高手看一下有哪些错误
只看楼主 加入收藏
cainiaohe
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2005-11-29
收藏
 问题点数:0 回复次数:0 
[求助]请斑竹和高手看一下有哪些错误

Private Sub Command1_Click()
If Combo1.Text = "" Then
MsgBox "请你选择登录用户!", 16, "提示"
Exit Sub
End If
Adodc2.Recordset.Close
Adodc2.Recordset.Open "select * from user where id='" + Combo1.Text + " '"
If Adodc2.Recordset.EOF Then
MsgBox "你所输入的用户还没登记!"
Combo1.SetFocus
Else
If Text2.Text = Adodc2.Recordset.Fields("password").Value Then
Me.Hide
Form2.Show
End If
Text2.Text = ""
Combo1.SetFocus
End If

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Private Sub Form_Load()
' Cmb2.Enabled = Not Cmb1.Enabled
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\db1.mdb"

Adodc2.CommandType = adCmdText

Adodc2.RecordSource = "select * from user"

Adodc2.Refresh

For a = 0 To Adodc2.Recordset.RecordCount - 1
Combo1.AddItem Adodc2.Recordset.Fields(0)
Adodc2.Recordset.MoveNext
Next
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub
如有错误,请帮忙改一下,跪谢了!

搜索更多相关主题的帖子: 斑竹 
2005-12-01 19:06
快速回复:[求助]请斑竹和高手看一下有哪些错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036959 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved