Make Table Query Only Runs After Edit

K

kagard

Greetings:

In Access 2010 SP1, 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."

Any of the following changes make the query work:

1. Uncheck and recheck the show checkbox for any field in design view.

2. Delete a comma between fields in the SELECT clause in SQL view and then put the comma back.

3. Edit the linked Excel workbook (xls format), then change it back to its original value, save and close the workbook.

In each case, the query then works in Access the first time I run it. After that, it fails again.

I did a compact and repair. No help. I also copied the SQL text, created a new query, and pasted the SQL into it. Same result. Does anyone know what might cause this?

TIA
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