Mitsules, Mark
Mark.Mitsules at ngc.com
Fri Jul 25 09:13:07 CDT 2003
Never mind... Mark (note to self: look in the table) -----Original Message----- From: Mitsules, Mark S. (Newport News) [mailto:mitsules_ms at nns.com] Sent: Friday, July 25, 2003 10:06 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] (Tip) Locate a Table Name within Queries Bruce, This is elegant...well done. Where is the best place to look for a list & definition of the constants that you used? Mark -----Original Message----- From: Bruce Bruen [mailto:bbruen at bigpond.com] Sent: Friday, July 25, 2003 9:36 AM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] (Tip) Locate a Table Name within Queries or better still, if there is a tendency to use subqueries: PARAMETERS [Enter table name] Text ( 255 ); SELECT MSysObjects.Name, IIf(IsNull([Expression]),[Name1],[Name2] & "(" & [Expression] & ")") AS SourceTable FROM MSysObjects INNER JOIN MSysQueries ON MSysObjects.Id = MSysQueries.ObjectId WHERE (((IIf(IsNull([Expression]),[Name1],[Name2] & "(" & [Expression] & ")")) Like "*" & [Enter table name] & "*") AND ((MSysObjects.Type)=5) AND ((MSysQueries.Attribute)=5)); B _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com