| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1137 人关注过本帖
标题:"过程声明与同名事件或过程的描述不匹配"
只看楼主 加入收藏
lyh820803
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2005-4-6
收藏
 问题点数:0 回复次数:1 
"过程声明与同名事件或过程的描述不匹配"

我在运行时弹出这个提示框"过程声明与同名事件或过程的描述不匹配"是什么意思啊 怎么解决这个问题啊? Option Explicit Dim rs As New ADODB.Recordset

Private Sub Command1_Click() On Error GoTo AddErr

If num.Text = "" Then MsgBox "请输入教室号!", vbOKOnly + vbExclamation, "警告" num.SetFocus Exit Sub End If If chair.Text = "" Then MsgBox "请输入桌椅数量!", vbOKOnly + vbExclamation, "警告" chair.SetFocus Exit Sub End If If Combo1.Text = "" Then MsgBox "请输入是否有投影仪!", vbOKOnly + vbExclamation, "警告" Combo1.SetFocus Exit Sub End If If window.Text = "" Then MsgBox "请输入窗户数量!", vbOKOnly + vbExclamation, "警告" window.SetFocus Exit Sub End If If door.Text = "" Then MsgBox "请输入门数量!", vbOKOnly + vbExclamation, "警告" door.SetFocus Exit Sub End If If text6.Text = "" Then MsgBox "请输入分发日期!出生年月应输入日期格式(YYYY-MM-DD)!", vbOKOnly + vbExclamation, "警告" text6.SetFocus Exit Sub End If If person.Text = "" Then MsgBox "请输入负责人姓名!", vbOKOnly + vbExclamation, "警告" person.SetFocus Exit Sub End If If tool.Text = "" Then MsgBox "请输入工具数量!", vbOKOnly + vbExclamation, "警告" tool.SetFocus Exit Sub End If If note.Text = "" Then MsgBox "请输入注释信息!", vbOKOnly + vbExclamation, "警告" note.SetFocus Exit Sub End If If Combo2.Text = "" Then MsgBox "请输入是否有电脑!", vbOKOnly + vbExclamation, "警告" Combo2.SetFocus Exit Sub End If

Exit Sub End If

If check1 = False Then MsgBox "教室号重复!", vbOKOnly + vbExclamation, "警告" num.SetFocus Else Adodc1.Recordset.AddNew Adodc1.Recordset.Fields("num").Value = num.Text Adodc1.Recordset.Fields("desk").Value = desk.Text Adodc1.Recordset.Fields("window").Value = window.Text Adodc1.Recordset.Fields("Projector").Value = Combo1.Text Adodc1.Recordset.Fields("date").Value = text6.Text Adodc1.Recordset.Fields("door").Value = door.Text Adodc1.Recordset.Fields("led").Value = led.Text Adodc1.Recordset.Fields("person").Value = person.Text Adodc1.Recordset.Fields("note").Value = note.Text Adodc1.Recordset.Fields("computer").Value = Combo2.Text Adodc1.Recordset.Update MsgBox "添加成功!", vbOKOnly + vbExclamation, "警告" Exit Sub End If AddErr: MsgBox Err.Description Exit Sub End Sub

Private Sub Command4_Click() Unload Me End Sub

Private Function check1() As Boolean On Error GoTo errh Set rs = cn.Execute("SELECT num FROM room1 WHERE num='" & Trim(num.Text) & "'") If rs.EOF Then rs.Close check1 = True Exit Function End If check1 = False rs.Close Exit Function errh: rs.Close MsgBox Err.Description End Function

搜索更多相关主题的帖子: 声明 描述 
2005-04-21 16:42
sfg976
Rank: 1
等 级:新手上路
帖 子:28
专家分:0
注 册:2005-4-13
收藏
得分:0 
怎么多了一个
exit sub
end if


还有好像rs 无对像啊
2005-04-21 16:59
快速回复:"过程声明与同名事件或过程的描述不匹配"
数据加载中...
 
   



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

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