Cannot open query in data sheet view

S

SJayTee

I have seen this query posted a couple of times but the answers given do not
help me.

"Your query will be opened in design view, possibly becuase another user has
a source table open in exclusive mode. Your query will be opened in Design
view."

Previously, when I have seen this message, it is because there is a problem
with the data in the field which has the relationship, ie part number in the
imported data. I usually resolve this by adding an apostrophe in front of
the number (via a macro) and this works.

However, I have tried this on my latest query and that has not helped.

My sql is SELECT Sheet5.ID, Sheet5.[Part No], Sheet5.[Rev Level],
Sheet5.Description, Sheet5.Supplier, Sheet5.[1031], Sheet5.[1678], [may
09].UM, [may 09].Amount, [may 09].Cur
FROM Sheet5 LEFT JOIN [may 09] ON Sheet5.[Part No] = [may 09].[Part No];

Can anybody help?

Sarah
 
J

John Spencer MVP

I would try the following. Note the brackets around the field name
Description - Description is a reserved word (usually a op[tional property of
most objects)

SELECT Sheet5.ID
, Sheet5.[Part No]
, Sheet5.[Rev Level]
, Sheet5.[Description]
, Sheet5.Supplier
, Sheet5.[1031]
, Sheet5.[1678]
, [may 09].UM
, [may 09].Amount
, [may 09].Cur
FROM Sheet5 LEFT JOIN [may 09]
ON Sheet5.[Part No] = [may 09].[Part No];

Other than that I don't see any reason for this query to fail

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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