Append Query

  • Thread starter Thread starter dale
  • Start date Start date
D

dale

I am trying to run an append query in my vba code. It does not seem to
get an error but the records never get inserted. If I run the query
manually it works fine. Here is what I have

dim qry as querydef
set qry = currentdb.querydefs("insClassBreed")

Any help is appreciated
 
Hi Dale

You are not running the query - merely setting a reference to it.

Add this line:
qry.Execute dbFailOnError
 
Back
Top