[AccessD] Does table exist?

t tom ttom at accessyourdata.com
Thu Mar 20 13:30:00 CST 2003


Hi Eric

Sorry,  didn't mean to be persistent  just having fun with this.
Its just that it looks more compact and doesn't use a loop.
Until I came across this code I did use the For Each .....Next construct.

 and thanks gustav,  how about if I rewrite this way

Public Function CheckTableExist (strTableName As String) As Boolean

Dim strCriteria As String
strCriteria = "name = '" & strTableName & "'" & " and (type=1 or type=6)"
CheckTableExist = IIf(DCount("[ID]", "MSysObjects", strCriteria) > 0, True,
False)

End Function


Tomt

----- Original Message -----
From: "Arthur Fuller" <artful at rogers.com>
To: <accessd at databaseadvisors.com>
Sent: Thursday, March 20, 2003 10:33 AM
Subject: RE: [AccessD] Does table exist?


> Then may all your women be young, Gustav.
>
>
> "Those who would sacrifice liberty for security deserve neither."
> -- Benjamin Franklin
>
> -----Original Message-----
> From: accessd-admin at databaseadvisors.com
> [mailto:accessd-admin at databaseadvisors.com] On Behalf Of Gustav Brock
> Sent: March 20, 2003 11:56 AM
> To: StaRKeY
> Subject: Re: [AccessD] Does table exist?
>
>
> Hi Eric
>
> That day a man stops looking for alternatives, he's old.
> The same goes for women.
>
> /gustav
>
>
> > Just out of curiousity Tom, why are you so persistent in using the
> > msysobjects while we are being offered a pretty easy down to earth
> > Access objectmodel? (I'm sorry if I came on too strong about the
> > sample)
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> 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