By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Access 2000 - Table Not Found

P: n/a
Hi All,

An interesting little issue that I can't seem to resolve. Note, I ran
this code in Access 97 and had not problem with it.

Here's the issue! I load a CSV file (DoCmd.TransferText acImportDelim,
etc.). I check to see if the table exists, visually, and it does (in
fact I can even open up the table). When I check to see if the table
exists using VBA code below, the answer is False. However, if I reload
the database, a miracle occurs. The table is now present according to
VBA. Here's the code:
Dim db As Database
Dim tdf As TableDef
Dim booFound As Boolean
Dim strTableName as String

Set db = DBEngine(0)(0)

booFound = False
For Each tdf In db.TableDefs
If (tdf.Name = strTableName) Then
booFound = True
Exit For
End If
Next tdf

MsgBox "Table found = " & booFound

Is there an issue with my code converting from Access 97 to Access
2000? Is there a new feature in Access 2000 that I have overlook here?
Is there a reference that I'm missing? Just as side-bar, I have tried
using DAO.Database and DAO.TableDef nothing new happened. Not really
sure where to go from here.

Thank you all in advance for you assistance and insight into this

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.