求教:大神看看是哪里出错了 Private Sub Command1_Click()If Trim(txtName.Text) = "" ThenMsgBox "请输入单位名称"txtName.SetFocusExit SubEnd IfAdodc1.Recordset.AddNewAdodc1.Recordset.Fields("name") = txtName.TextAdodc1.Recordset.Field
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/30 21:55:34
![求教:大神看看是哪里出错了 Private Sub Command1_Click()If Trim(txtName.Text) =](/uploads/image/z/1582349-5-9.jpg?t=%E6%B1%82%E6%95%99%EF%BC%9A%E5%A4%A7%E7%A5%9E%E7%9C%8B%E7%9C%8B%E6%98%AF%E5%93%AA%E9%87%8C%E5%87%BA%E9%94%99%E4%BA%86+Private+Sub+Command1_Click%28%29If+Trim%28txtName.Text%29+%3D+%22%22+ThenMsgBox+%22%E8%AF%B7%E8%BE%93%E5%85%A5%E5%8D%95%E4%BD%8D%E5%90%8D%E7%A7%B0%22txtName.SetFocusExit+SubEnd+IfAdodc1.Recordset.AddNewAdodc1.Recordset.Fields%28%22name%22%29+%3D+txtName.TextAdodc1.Recordset.Field)
求教:大神看看是哪里出错了 Private Sub Command1_Click()If Trim(txtName.Text) = "" ThenMsgBox "请输入单位名称"txtName.SetFocusExit SubEnd IfAdodc1.Recordset.AddNewAdodc1.Recordset.Fields("name") = txtName.TextAdodc1.Recordset.Field
求教:大神看看是哪里出错了
Private Sub Command1_Click()
If Trim(txtName.Text) = "" Then
MsgBox "请输入单位名称"
txtName.SetFocus
Exit Sub
End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("name") = txtName.Text
Adodc1.Recordset.Fields("district") = txtdistrict.Text
Adodc1.Recordset.Fields("category") = txtcategory.Text
Adodc1.Recordset.Fields("delegate") = txtdelegate.Text
Adodc1.Recordset.Fields("way") = txtway.Text
Adodc1.Recordset.Update
Unload Me
End Sub
求教:大神看看是哪里出错了 Private Sub Command1_Click()If Trim(txtName.Text) = "" ThenMsgBox "请输入单位名称"txtName.SetFocusExit SubEnd IfAdodc1.Recordset.AddNewAdodc1.Recordset.Fields("name") = txtName.TextAdodc1.Recordset.Field
括号里是数据库中的属性,此程序是实现点击添加数据记录的.单从这个私有sub看不出哪里出错.