关于VB的,请高手帮忙

来源:百度知道 编辑:UC知道 时间:2024/06/03 16:32:11
Private Sub Text6_GotFocus()

Text6.Text = Str$(Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text))

End Sub
Private Sub Command1_Click()

DBGrid1.Visible = True

End Sub

Private Sub Command2_Click()

srxg = True
Data1.Recordset.AddNew
Text1.SetFocus

End Sub

Private Sub Command3_Click()

srxg = True
Data1.Recordset.Edit
Text1.SetFocus

End Sub

Private Sub Command4_Click()

Dim num As Integer
num = Val(Text1.Text)
ss = MsgBox("真的要删除这个纪录吗?", vbYesNo + vbInformation, "删除纪录")
If (ss = vbYes) Then
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End If

End Sub

Private Sub Command5_Click()

srxg = True
Data1.Recordset.Update<

忘光了

能详细说一下都用了哪些控件以及名字吗?DBGRID1是什么呢
昨天试了一下,把".Visible"选中删除,再敲入".V"之后会弹出选项X选择VISIBLE 好像就能运行了
我也不知道是为什么
试过了吗?

应该没错吧。。。

看上去没有错。别写代码,直接修改属性试试。