I'm using MS Access 2003.
Not sure if this is a dumb question, but ...
When I save a query in MS Access 2003, it has the annoying habit of reformatting my query. For example, if I enter and save the following code in my query screen,
after saving, closing, and reopening, I see this:
I have discovered that if I add a useless UNION ALL to the the code, it preserves the formatting (mostly), like this:
I've also resorted to other techniques, like reformatting with an online SQL formatter after making changes, but that's clumsy and doesn't always format as I wish.
Is there a better way?
Thanks.
Wayne
Not sure if this is a dumb question, but ...
When I save a query in MS Access 2003, it has the annoying habit of reformatting my query. For example, if I enter and save the following code in my query screen,
Code:
SELECT DISTINCT
a.CommunicationHeader AS CommunicationHeader,
a.Filename AS Filename,
a.Sender AS Sender,
a.EdiCreateDate AS EdiCreateDate,
a.EdiCreateTime AS EdiCreateTime,
Now() AS ImportDateTime
FROM tblLiaImport AS a
after saving, closing, and reopening, I see this:
Code:
SELECT DISTINCT a.CommunicationHeader AS CommunicationHeader, a.Filename AS Filename, a.Sender AS Sender, a.EdiCreateDate AS EdiCreateDate, a.EdiCreateTime AS EdiCreateTime, Now() AS ImportDateTime
FROM tblLiaImport AS a;
I have discovered that if I add a useless UNION ALL to the the code, it preserves the formatting (mostly), like this:
Code:
SELECT DISTINCT
a.CommunicationHeader AS CommunicationHeader,
a.Filename AS Filename,
a.Sender AS Sender,
a.EdiCreateDate AS EdiCreateDate,
a.EdiCreateTime AS EdiCreateTime,
Now() AS ImportDateTime
FROM tblLiaImport AS a
UNION ALL SELECT DISTINCT
a.CommunicationHeader AS CommunicationHeader,
a.Filename AS Filename,
a.Sender AS Sender,
a.EdiCreateDate AS EdiCreateDate,
a.EdiCreateTime AS EdiCreateTime,
Now() AS ImportDateTime
FROM tblLiaImport AS a
WHERE 1=0;
I've also resorted to other techniques, like reformatting with an online SQL formatter after making changes, but that's clumsy and doesn't always format as I wish.
Is there a better way?
Thanks.
Wayne