-
Table Is Exist ??
Dear Sir
How Can I Examine The Table If It's Already Exist Or Not In Access 97
DataBase Using Visual Basic Ent 5.0
Thanks Lot
Hamad
-
Re: Table Is Exist ??
Hamand:
If you are using DAO then this will work:
Private Sub Form_Load()
Dim db As Database
Set db = OpenDatabase("C:\MyFolder\MyDatabase.mdb")
If TableExists(db, "myTable") Then
MsgBox "Table myTable Exists"
Else
MsgBox "Table myTable Does Not Exist"
End If
End Sub
Private Function TableExists(db As Database, sTable As String) As Boolean
Dim tbl As TableDef
On Error GoTo TableExistsExit
Set tbl = db.TableDefs(sTable)
TableExists = True
Exit Function
TableExistsExit:
End Function
Cheers,
Larry Rebich
More tips link to:
http://www.buygold.net/tips.html
Please:
No personal e-mail questions :-)
"Hamad" <alawadh@hotmail.com> wrote in message
news:3aef0ed1$1@news.devx.com...
>
>
> Dear Sir
>
> How Can I Examine The Table If It's Already Exist Or Not In Access 97
>
> DataBase Using Visual Basic Ent 5.0
>
> Thanks Lot
> Hamad
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks