What put the bang! in my subquery

  • Thread starter Thread starter Evi
  • Start date Start date
E

Evi

Playing around with Subqueries I've noticed that whenever I do anything to
change the query in the Design view, a bang (!) appears just in front of the
brackets that section off the subquery. Then I get an error about the ! when
I try to run the query

Is this normal? What does it mean? What can I do to avoid it?
Evi
 
Playing around with Subqueries I've noticed that whenever I do anything to
change the query in the Design view, a bang (!) appears just in front of the
brackets that section off the subquery. Then I get an error about the ! when
I try to run the query

Is this normal? What does it mean? What can I do to avoid it?
Evi

Not normal at all... I've never seen it happen! What version of Access? Could
you post the SQL of such a query and indicate what kind of change you're
making?
 
I think I know what's causing it. The bang appeared just after the word
Price in the first row and, as you can see, I didn't have a comma after it.
Since I have commas after everything else, I guess I ought to have one there
also.
I'm using Acc 2000. It appeared first when I added Item to the query's
record source (QryRptInvOrd) and then to the query.
It next appeared when I added the Order By clause.

SELECT QryRptInvOrd.InvDate, QryRptInvOrd.ItemID, QryRptInvOrd.Price(SELECT
TOP 1 Dupe.InvDate
FROM QryRptInvOrd AS Dupe
WHERE Dupe.ItemID = QryRptInvOrd.ItemID
AND Dupe.InvDate<QryRptInvOrd.InvDate
ORDER BY Dupe.InvDate DESC, Dupe.InvDate) AS PriorValue, QryRptInvOrd.Item
FROM QryRptInvOrd
ORDER BY QryRptInvOrd.Item;

Evi
 

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

Back
Top