Run an Append Query from a Form

  • Thread starter Thread starter wizcow2
  • Start date Start date
W

wizcow2

Guest
Is it possible to run an append query from a form?

I would like to click a button on my form and have the subform fill with the results of an append query.

Any ideas?

Tom
 
Attach the following code to your button

Code:
DoCmd.SetWarnings False
DoCmd.OpenQuery "YourAppendQueryName"
DoCmd.SetWarnings True


Note: the Setwarnings lines stops the "You are about to ...." default messages from annoying you.

You will then have to requery your subform to display added records.

HTH

Brad.
 

Users who are viewing this thread

Back
Top Bottom