D
debraj007
Hello, and thanks for your efforts in advance . I have written an append
query that runs when you click on a button in my form (appends the current
record to a different table). The query works independently, but when I try
to run from the form, I get the error "Too few parameters. Expected 2". Here
is the code I used on the on click procedure
Private Sub cmdCopyItemInfo_Click()
On Error GoTo Err_cmdCopyItemInfo_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
CurrentDb.Execute ("query1"), dbFailOnError
Exit_cmdCopyItemInfo_Click:
Exit Sub
Err_cmdCopyItemInfo_Click:
MsgBox Err.Description
Resume Exit_cmdCopyItemInfo_Click
End Sub
Does anyone have any suggestions to help me correct this issue? Thanks!
Deb
query that runs when you click on a button in my form (appends the current
record to a different table). The query works independently, but when I try
to run from the form, I get the error "Too few parameters. Expected 2". Here
is the code I used on the on click procedure
Private Sub cmdCopyItemInfo_Click()
On Error GoTo Err_cmdCopyItemInfo_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
CurrentDb.Execute ("query1"), dbFailOnError
Exit_cmdCopyItemInfo_Click:
Exit Sub
Err_cmdCopyItemInfo_Click:
MsgBox Err.Description
Resume Exit_cmdCopyItemInfo_Click
End Sub
Does anyone have any suggestions to help me correct this issue? Thanks!
Deb