confirmation messages on append query

J

June

I am executing a couple of append queries from a button on
a form but the confirmation messages are confusing to new
users and just basically annoying. I don't want to set
warnings to false and true because then other errors don't
come across. I tried using the CurrentDB.Execute method
but I'm getting a runtime error 3061,"too few parameters
expected 2". My code is simply:

Private Sub CommandSave_Click()

CurrentDb.Execute "qryMfg", dbFailOnError
CurrentDb.Execute "qryComp", dbFailOnError

End Sub
Any ideas or suggestions?
 
D

Dale Fye

Without seeing the SQL of your two queries, my first guess
is that one or both of these queries requires a parameter
that you are not setting. If you could post the SQL, we
might be able to identify the problem.

Dale
 
J

June

Yes, they do require parameters but I don't know much VBA
so I don't know how to supply them:
INSERT INTO tblMfg ( SampleID, ParentID, SequenceNumber,
Operator, Carbon, CarbonInv, PercentMetals, SolidsLoading,
System_ID, Generator, DIWaterPH, TempIn, TempOut, )
SELECT tblPostprocessing.SampleID,
tblPostprocessing.ParentID, tblMfg.SequenceNumber,
tblMfg.Operator, tblMfg.Carbon, tblMfg.CarbonInv,
tblMfg.PercentMetals, tblMfg.SolidsLoading,
tblMfg.System_ID, tblMfg.Generator, tblMfg.DIWaterPH,
tblMfg.TempIn, tblMfg.TempOut
FROM tblMfg INNER JOIN tblPostprocessing ON
tblMfg.SampleID = tblPostprocessing.ParentID
WHERE (((tblPostprocessing.SampleID)=[Forms]!
[frmPostProcessing]![SampleID]) AND
((tblPostprocessing.ParentID)=[Forms]![frmPostProcessing]!
[ParentID]));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top