G
Guest
The small Access application I have runs a function as as event from a
command button that deletes tables created by a Make Table Queries to clean
up and prepare the application for new data to be imported. The function
successfully deletes all but one table named in the function, yet when I
re-open the application, go to Modules in the Database view, and then
"manually" run the function from there, the table is successfully deleted.
The table name in this issue is "ACTIVITY_CODES", and the function is written
as follows:
Function Clean_Up()
Dim Strdel(0 To 50) As String
Strdel(1) = "ASCH"
Strdel(2) = "SGAB"
Strdel(3) = "COLLECTED_DATA"
Strdel(4) = "INCLUSION_SEGMENTS"
Strdel(5) = "ACTIVITY_CODES"
Set dbcurrent = CurrentDb()
On Error Resume Next
For B = 1 To 5
dbcurrent.TableDefs.Delete Strdel(B)
DoEvents
Next B
Set dbcurrent = Nothing
End Function
What should I look for?
Thanks,
RC
command button that deletes tables created by a Make Table Queries to clean
up and prepare the application for new data to be imported. The function
successfully deletes all but one table named in the function, yet when I
re-open the application, go to Modules in the Database view, and then
"manually" run the function from there, the table is successfully deleted.
The table name in this issue is "ACTIVITY_CODES", and the function is written
as follows:
Function Clean_Up()
Dim Strdel(0 To 50) As String
Strdel(1) = "ASCH"
Strdel(2) = "SGAB"
Strdel(3) = "COLLECTED_DATA"
Strdel(4) = "INCLUSION_SEGMENTS"
Strdel(5) = "ACTIVITY_CODES"
Set dbcurrent = CurrentDb()
On Error Resume Next
For B = 1 To 5
dbcurrent.TableDefs.Delete Strdel(B)
DoEvents
Next B
Set dbcurrent = Nothing
End Function
What should I look for?
Thanks,
RC