H
howard
Hi there
If anyone's able to help me with my Access crashes each
time I try to delete a Table, programmatically, I'd be
most grateful. The code/s I execute to delete a Table is
as below;
Sub myDeleteTable(strTNAME As String)
Dim strPATH As String
strPATH = "C:\DMP_DataBase\September24\DMP_Roy.mdb"
myCallDeleteTable strPATH, strTNAME
End Sub
Sub myCallDeleteTable(strPATH As String, strTNAME As
String)
Dim catDELETE As ADOX.Catalog
Set catDELETE = New ADOX.Catalog
catDELETE.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & strPATH
catDELETE.Tables.Delete strTNAME
Set catDELETE = Nothing
End Sub
Whenever the code gets to the
line: "catDELETE.Tables.Delete strTNAME", it crashes.
Access 2002 comes up with that dialog box that asks if you
want your database repaired, and if you want to send a
report, about the error, to Microsoft.
Please help!
Thanks
H
If anyone's able to help me with my Access crashes each
time I try to delete a Table, programmatically, I'd be
most grateful. The code/s I execute to delete a Table is
as below;
Sub myDeleteTable(strTNAME As String)
Dim strPATH As String
strPATH = "C:\DMP_DataBase\September24\DMP_Roy.mdb"
myCallDeleteTable strPATH, strTNAME
End Sub
Sub myCallDeleteTable(strPATH As String, strTNAME As
String)
Dim catDELETE As ADOX.Catalog
Set catDELETE = New ADOX.Catalog
catDELETE.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & strPATH
catDELETE.Tables.Delete strTNAME
Set catDELETE = Nothing
End Sub
Whenever the code gets to the
line: "catDELETE.Tables.Delete strTNAME", it crashes.
Access 2002 comes up with that dialog box that asks if you
want your database repaired, and if you want to send a
report, about the error, to Microsoft.
Please help!
Thanks
H