[AccessD] Does Query Exist In Access Queries

Charlotte Foust cfoust at infostatsystems.com
Tue Dec 2 11:08:51 CST 2003


Sure, but the intent was to delete it in the first place, so there's nothing wrong with simply trying to delete it.  Obviously, if you wanted to just check to see if it existed, you wouldn't do *that* by trying to delete it.

Charlotte Foust

-----Original Message-----
From: Andy Lacey [mailto:andy at minstersystems.co.uk] 
Sent: Tuesday, December 02, 2003 8:59 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: RE: [AccessD] Does Query Exist In Access Queries


I'd suggest caution with "try to delete it". Surely if it did exist it won't any more after that.

Andy Lacey
http://www.minstersystems.co.uk 

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> paul.hartland at fsmail.net
> Sent: 02 December 2003 16:35
> To: Access Developers discussion and problem solving
> Subject: Re: RE: [AccessD] Does Query Exist In Access Queries
> 
> 
> Charlotte,
> Thanks for your help, never even considered On Error
> etc......Think the powers that be are working me too hard..... Paul
> 
> 
> 
> 
> 
> Message date : Dec 02 2003, 04:24 PM
> >From : Charlotte Foust
> To : Access Developers discussion and problem solving
> Copy to : 
> Subject : RE: [AccessD] Does Query Exist In Access Queries
> The easiest way to test it is to try to set an object 
> variable to point to it and trap the error. If there is no 
> error, it exists. Alternatively, try to delete it and trap 
> the error. If it didn't exist, an error will occur and you'll 
> know what happened.
> 
> Charlotte Foust
> 
> -----Original Message-----
> From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net]
> Sent: Tuesday, December 02, 2003 7:54 AM
> To: accessd
> Subject: [AccessD] Does Query Exist In Access Queries
> 
> 
> To all,
> I'm sure I have done this before but can't find the code
> anywhere and can't figure out how to do it, basically I want 
> to know if a query called qryProgrammeAvailability exists 
> before I delete it via VB/VBA Thanks in advance for you help. 
> Paul Hartland Freeserve AnyTime - HALF PRICE for the first 3 
> months - Save £7.50 a month 
> www.freeserve.com/anytime 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> Freeserve 
> AnyTime - HALF PRICE for the first 3 months - Save £7.50 a month 
> www.freeserve.com/anytime 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> 
> 
> 


_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list