isladogs
MVP / VIP
- Local time
- Today, 18:31
- Joined
- Jan 14, 2017
- Messages
- 18,216
I would still question why the user is being offered a delete button when there is nothing to delete?
Would also solve your problem as well.
Good point Paul.
If the OP can successfully identify a way of checking there are no temp tables, the Delete button should either be disabled or hidden.
In which case the last bit of code becomes redundant.