Make table query only runs from design view.

K

kagard

Greetings:

If I try to run this query from vba or by double clicking on it in the
navigation pane:

SELECT Key, [Curr Qtr TY], [Curr Qtr LY], Diff, Pct, [YTD Pct]
INTO dctCurrQtrActYTD
IN '\\ds3\Access Databases\DataCentral\DataCentral.accdb'
FROM tblCurrQtrActYTD;

I get this error:

"You cannot record your changes because a value you entered violates
the settings defined for this table or list."

The query fails on the same error if I run it from design view. But,
if I open it in design view, then uncheck and recheck the show
checkbox for any field, the query runs. Doesn't matter which field I
choose, and in the end all the show checkboxes are checked, just like
they were when I started.

This is a problem because I'm trying to run this query (along with
several others) automatically through vba every morning. Does know
what is causing this?

TIA
Keith
 
K

kagard

I did some additional testing. If I open this in SQL view and run it,
it fails. But if I delete a comma between fields in the SELECT clause
and then put the comma back, it runs. Weird?

Keith
 
K

kagard

I tried a compact and repair. No help.
I also copied the SQL text, created a new query, and pasted the SQL
into it. Same result.

Keith
 
K

kagard

If I open the linked Excel workbook (xls format) make some edit. Then
I change it back to its original value, save and close the workbook.
The query then works in Access in the first time I run it. After that
it fails again.

Keith
 

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