VB缺少函数或者变量 急!求大神

图附上代码PrivateSubCommand1_Click()IfText1.Text=""OrText2.Text=""OrText3.Text=""OrText4.T...
附上代码
Private Sub Command1_Click()

If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text6.Text = "" Or Text7.Text = "" Or Text8.Text = "" Or Text9.Text = "" Or Text10.Text = "" Or Text11.Text = "" Or Text12.Text = "" Or Text13.Text = "" Or Text14.Text = "" Or Text15.Text = "" Or Text16.Text = "" Then
MsgBox "填写的信息不完整", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Exit Sub
End If
With Datal
.Recordset.AddNew
.Recordset.Fields("款号") = Text1.Text
.Recordset.Fields("品号") = Text2.Text
.Recordset.Fields("颜色") = Text3.Text
.Recordset.Fields("色号") = Text4.Text
.Recordset.Fields("S") = Text5.Text
.Recordset.Fields("M") = Text6.Text
.Recordset.Fields("L") = Text7.Text
.Recordset.Fields("XL") = Text8.Text
.Recordset.Fields("XXL") = Text9.Text
.Recordset.Fields("XXL") = Text11.Text
.Recordset.Fields("库存数") = Text12.Text
.Recordset.Fields("价格") = Text13.Text
.Recordset.Fields("分类") = Text14.Text
.Recordset.Fields("面料") = Text15.Text
.Recordset.Fields("季节") = Text16.Text
.Recordset.Fields("年份") = Text10.Text
Datal Refresh
Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text6.Text = "" Or Text7.Text = "" Or Text8.Text = "" Or Text9.Text = "" Or Text10.Text = "" Or Text11.Text = "" Or Text12.Text = "" Or Text13.Text = "" Or Text14.Text = "" Or Text15.Text = "" Or Text16.Text = ""
Text1.SetFocus
End With
End Sub
Private Sub Command2_Click()
Unload Me
Form2.Show
End Sub
展开
 我来答
szqaly
2014-06-22 · TA获得超过1745个赞
知道大有可为答主
回答量:2107
采纳率:77%
帮助的人:1504万
展开全部
Datal.Refresh 刷新嘛,少了个点。
我看也不用了,应该是:.Recordset.Update

Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text6.Text = "" Or Text7.Text = "" Or Text8.Text = "" Or Text9.Text = "" Or Text10.Text = "" Or Text11.Text = "" Or Text12.Text = "" Or Text13.Text = "" Or Text14.Text = "" Or Text15.Text = "" Or Text16.Text = ""
这串也不对,文本框清空,不要有Or。把Or替换为冒号,或一行一句赋值语句也可。
522874886
2014-06-22 · TA获得超过170个赞
知道小有建树答主
回答量:100
采纳率:0%
帮助的人:130万
展开全部
Datal Refresh
改为
.Refresh
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式