1

I have seen this thread and the answers provided indicated to use the 'Description' property of the query to add a comment on the query. This was for Access 2007 at the newest. I'm using 2010 and have tried many different operators for comments (and a bit of googling) to no avail.

I have written a bunch of long-winded queries and need to comment them to indicate the reasons that these similar queries are returning different data.

Is there any way to add in-line comments in the SQL of the query objects?

Community
  • 1
  • 1
Scotch
  • 3,186
  • 11
  • 35
  • 50

2 Answers2

4

Access SQL does not support SQL comments. The closest you can do is something like this ... which is ugly.

SELECT
    'your comment here' AS comment,
    id,
    fld2
FROM YourTable;

The comment is then a field expression which is included in every row.

HansUp
  • 95,961
  • 11
  • 77
  • 135
0

I create another Access table called MyComments and put them in there.