Prev: Nested views
Next: IFF statement Repost
From: John Spencer on 26 Jan 2010 08:42 Can you do the following in the VBA immediate window? I am guessing not based on your earlier statements, but it does not hurt me to confirm this. ?currentdb.QueryDefs("NameOfTheQuery").SQL If you get the SQL of the query using that, you can copy it and paste it into a NEW query to get a clean copy of the query. If that does not work, then all I can think of is that something has corrupted the querydef. Which means that after all you have tried you may need to delete this query, compact your database, and rebuild the query from scratch. Or even tougher repeat what you have done earlier and import everything with the exception of this query into a new database. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Petr Danes wrote: >> Can you post the SQL? > > No, I can't. Again: > > "The query works fine and displays fine in the graphic window, but throws an > error message about "The SQL statement could not be executed because it > contains ambiguous outer joins." when I attempt to switch to SQL view and > throws error 3258 with the same message in VBA when I try to use code to > display the SQL." > > Pete
From: Petr Danes on 26 Jan 2010 14:08
Nope, same results - error 3258. I'm not going to sweat it, I got what I needed the SQL for another way and since the query works in normal use, that's going to have to do. I have too much other work to pursue this now, it just irks me, since I see no reason for Access to act like this. Pete "John Spencer" <spencer(a)chpdm.edu> p�se v diskusn�m pr�spevku news:eehot1onKHA.4436(a)TK2MSFTNGP02.phx.gbl... > Can you do the following in the VBA immediate window? I am guessing not > based on your earlier statements, but it does not hurt me to confirm this. > > ?currentdb.QueryDefs("NameOfTheQuery").SQL > > If you get the SQL of the query using that, you can copy it and paste it > into a NEW query to get a clean copy of the query. If that does not work, > then all I can think of is that something has corrupted the querydef. > > Which means that after all you have tried you may need to delete this > query, compact your database, and rebuild the query from scratch. Or even > tougher repeat what you have done earlier and import everything with the > exception of this query into a new database. > > John Spencer > Access MVP 2002-2005, 2007-2010 > The Hilltop Institute > University of Maryland Baltimore County > > Petr Danes wrote: >>> Can you post the SQL? >> >> No, I can't. Again: >> >> "The query works fine and displays fine in the graphic window, but throws >> an error message about "The SQL statement could not be executed because >> it contains ambiguous outer joins." when I attempt to switch to SQL view >> and throws error 3258 with the same message in VBA when I try to use code >> to display the SQL." >> >> Pete |