About "Operation must use updateable query" (Error: 3073)

H

hoganxian

Hi,there,

My purpose is once clicking the a button ( using Access form ) VBA
code will generate a query and execute it.

However, I encounter this error: "Operation must use updateable
query" (Error: 3073)

I set "Everyone" has the full control of the Access database folder,
but it does not work.

If I test that query in a module( step by step, without using Form,
Button, etc) it works well.

So, what's the problem?

Any ideas?

thanks~~
 
H

hoganxian

SELECT gfkey, german
FROM gfkeys LEFT JOIN Tran
ON strcomp(gfkeys.gfkey,Tran.english,0)=0
WHERE Tran.english is NULL or Tran.german='&NOTRAN&';

B.T.W This SQL is generated by VBA.
 
S

SusanV

VBA DoCmd.RunSQL only executes action queries - update, insert, make table
etc. Not Select. You can use the SQL you generate for a recordset, then use
the recordset to update your table or whatever...
 
D

dbahooker

if you get this message in a real-world implementation-- then run away
and start using Access Data Projects


MDB just randomly craps out


-Aaron
 
H

hoganxian

The problem is : If I run this query in another macro,like this:

public sub test()

DoCmd.TransferSpreadsheet, acExport,
acSpreadSheetTypeExcel9,'qryTemp","d:\a.xls"

end sub

It works very well!!!

So, why??
 

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