|
-
Nov 13th, 2007, 02:06 PM
#1
Thread Starter
Lively Member
Microsoft Access: SQL View - Subquery aliases This is really annoying
Hi All
Please does anyone know how to stop Microsoft Access changing my SQL scripts to use the "]. AS" notation for subquery aliases in the SQL view.
For example:
Code:
SELECT *
FROM (SELECT [GED Accounts].[EAS Account]
FROM [GED Accounts])SUBQUERY1;
becomes,
Code:
SELECT *
FROM [SELECT [GED Accounts].[EAS Account]
FROM [GED Accounts]]. AS SUBQUERY1;
The answer would be very much appreciated!
Thanks
Pobo
-
Nov 13th, 2007, 02:46 PM
#2
Re: Microsoft Access: SQL View - Subquery aliases This is really annoying
Simple, dont switch to Design view as when you switch views it reformats the sql code.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 15th, 2007, 05:57 AM
#3
Thread Starter
Lively Member
Re: Microsoft Access: SQL View - Subquery aliases This is really annoying
RobDog888
Does that mean you can't stop MS Access reformatting the SQL code. I DO NOT want the SQL script reformatted at any time. Especially, after saving, closing and reopening it.
RobDog888, I'm sorry to say that your simple solution doesn't resolve my problem at all!
Does anyone else know if it is possible to stop this automatic reformatting happening?
Thanks
Pobo
-
Nov 15th, 2007, 06:54 AM
#4
Re: Microsoft Access: SQL View - Subquery aliases This is really annoying
The only way I know is what RobDog888 suggested - only ever look at the query in SQL view. As soon as you open it in another view, Access will 'kindly' change it for you.
Unfortunately sometimes it will also make changes when you save in SQL view too, but I have never found a solution for that.
-
Nov 19th, 2007, 11:15 AM
#5
Thread Starter
Lively Member
Re: Microsoft Access: SQL View - Subquery aliases This is really annoying
Thanks guys.
Its a shame Microsoft hasn't made this automatic reformatting optional!
-
Nov 19th, 2007, 12:23 PM
#6
Re: Microsoft Access: SQL View - Subquery aliases This is really annoying
True. I too have spent time formatting my sql in access only to have it jacked up by viewing in design view. Plus,even if you dont view in design view it will get jacked up again if you do a Compact and Repair.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|