一点击"添加记录"就出现错误提示!小妹的代码是别人写好给我输入的,看不懂代码是不是有错误!
-----------------------------------------
Option Compare Database
Private Sub cmdAdd_Click()
On Error GoTo Err_cmdAdd_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAdd_Click:
Exit Sub
Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click
End Sub
Option Compare Database
Private Sub cmdAdd_Click()
'添加记录
On Error GoTo Err_cmdAdd_Click
'DoCmd.GoToRecord , , acFirst
DoCmd.GoToRecord , , acNewRec
cmdMod.Enabled = True
cmdMod.SetFocus
cmdAdd.Enabled = False
Exit_cmdAdd_Click:
Exit Sub
Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click
End Sub
Private Sub Command14_Click()
'查看库存报表
DoCmd.OpenReport "库存报表", acViewPreview
End Sub
----------------------------------------------
请大家指点帮我修改一下吧!
[此贴子已经被作者于2005-2-24 14:26:10编辑过] |