H
Holmes
In Access 2007, when I set up a View to query some fields and then delete
some of the fields from the query I get an error message.
For example, I set up a View in Access 2007 to return columns X, Y and Z, as
shown below:
SELECT col_X, col_Y, col_Z
FROM dbo.Sales
I then successfully executed the query.
I then removed columns X and Y from the View so that the query would only
return Z as shown below:
SELECT col_Z
FROM dbo.Sales
When I executed the View, I got a Microsoft Access error message that said
"Cannot find column 'X'". So, I addedd column X back to the query, reran it
and got the error message "Cannot find column 'Y'". I added column Y back to
the query and it ran fine. The only way I could get the View to run was to
copy the SQL code to a new View and then it ran fine. This type of thing
happens often, but not 100% of the time. It only happens with Views, not
Stored Procedures. I'm pretty sure it's an Access 2007 issue because I could
get the Views to execute in Microsoft Enterprise Manager.
Can anybody explain what my problem may be? Thanks in advance.
some of the fields from the query I get an error message.
For example, I set up a View in Access 2007 to return columns X, Y and Z, as
shown below:
SELECT col_X, col_Y, col_Z
FROM dbo.Sales
I then successfully executed the query.
I then removed columns X and Y from the View so that the query would only
return Z as shown below:
SELECT col_Z
FROM dbo.Sales
When I executed the View, I got a Microsoft Access error message that said
"Cannot find column 'X'". So, I addedd column X back to the query, reran it
and got the error message "Cannot find column 'Y'". I added column Y back to
the query and it ran fine. The only way I could get the View to run was to
copy the SQL code to a new View and then it ran fine. This type of thing
happens often, but not 100% of the time. It only happens with Views, not
Stored Procedures. I'm pretty sure it's an Access 2007 issue because I could
get the Views to execute in Microsoft Enterprise Manager.
Can anybody explain what my problem may be? Thanks in advance.