I have stepped through to check the value of DelCodeNumber, and the value I
use is "1", because indeed the table name I create in the database is a kind
of code number, like "1" , "12" , "25", "314", etc.
So the value of variable DelCodeNumber is "1", not "1.tbl". I had use the
"1.tbl" but the result is the same.
catStok.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &
"Data Source=C:\dbStok.mdb;"
tblStok.Name = NoKodeDel + ".tbl"
catStok.Tables.Delete tblStok --> Here the program stop running
Set catStok.ActiveConnection = Nothing
Set catStok = Nothing
I use Visual Basic 6 within Visual Studio 6 Enterprise Edition, and Ms
Access XP.
If you have a better or another way just to delete / drop Ms Access XP table
with Visual Basic 6, let me know. Or may be have I to use Ms Access 97 and
use DAO ?
Thank you very much for your attention.
"Leon Mayne [MVP]" wrote:
Have you stepped through to check the value of DelCodeNumber to make sure
it's correct?