|
3#
楼主 |
发表于 2006-11-9 20:59:00
|
只看该作者
Private Sub cmd1_Click()
Dim rs As New ADODB.Recordset
rs.Open "报警数量", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
rs.AddNew
rs.Fields("名称") = Me.名称
rs.Fields("型号") = Me.型号
rs.Fields("报警数量") = Me.报警数量
rs.Update
rs.Close
Set rs = Nothing
Dim rs1 As New ADODB.Recordset
rs1.Open "购买", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
rs1.AddNew
rs1.Fields("名称") = Me.名称
rs1.Fields("型号") = Me.型号
rs1.Fields("购买数量") = Me.购买数量
rs1.Update
rs1.Close
Set rs1 = Nothing
Me.购买数量 = ""
Me.名称 = ""
Me.型号 = ""
Me.报警数量 = ""
MsgBox "存入到两表中了,不信你看看!"
End Sub
Private Sub 名称_BeforeUpdate(Cancel As Integer)
End Sub
谢谢阿~
Me.购买数量 = ""
Me.名称 = ""
Me.型号 = ""
Me.报警数量 = ""
这个是什么啊?是弹出窗口的命令吗?
|
|