QueryDefs

M

Mark

Hi.

I have an append query to call from within a vba module. I'm new to this so
please excuse the basic nature of the question.

The code I have looks like:

sub AppendTemp()
dim db as dao.Database
Set db = DBEngine(0) (0)

db.QueryDefs("appendQueryName").execute

End Sub

When I try to run this, I get "Run-Time error '3265' Item not found in this
collection."

The query is a long one so I thought it best to reference it from the VBA
for simplicity. The query runs OK should I try to run it manually from within
Access.

I'm sure it is simple enough and I would appreciate your assistance.

Regards,

Mark
 
D

Douglas J. Steele

The message implies that you might have mistyped the name of the query: that
it's not appendQueryName.
 

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