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
puzzle...
Regards,
Dave