access 如何用VBA清除文本框里的文字
如题,窗体通过按钮获取文本框和组合框的字符串:'录入数据txtDate.SetFocusRs.Fields("PurchaseDate")=txtDate.Textcmb...
如题,窗体通过按钮获取文本框和组合框的字符串:
'录入数据
txtDate.SetFocus
Rs.Fields("PurchaseDate") = txtDate.Text
cmbWayToPay.SetFocus
Rs.Fields("WayToPay") = cmbWayToPay.Text
txtComsumption.SetFocus
Rs.Fields("Comsumption") = txtComsumption.Text
txtCost.SetFocus
Rs.Fields("Cost") = txtCost.Text
txtOthers.SetFocus
Rs.Fields("Others") = txtOthers.Text
'保存数据
Rs.Update
'提示用户
MsgBox ("记录已保存!!")
----------------------------------------------------------------
然后我想系统自动清除文本框和组合框里的字符串,用VBA应该怎样写? 展开
'录入数据
txtDate.SetFocus
Rs.Fields("PurchaseDate") = txtDate.Text
cmbWayToPay.SetFocus
Rs.Fields("WayToPay") = cmbWayToPay.Text
txtComsumption.SetFocus
Rs.Fields("Comsumption") = txtComsumption.Text
txtCost.SetFocus
Rs.Fields("Cost") = txtCost.Text
txtOthers.SetFocus
Rs.Fields("Others") = txtOthers.Text
'保存数据
Rs.Update
'提示用户
MsgBox ("记录已保存!!")
----------------------------------------------------------------
然后我想系统自动清除文本框和组合框里的字符串,用VBA应该怎样写? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询