Your title and question do not really match...
>> The problem with deleting the actual application is that, well, it's open and in use; thus, I see only two options:
1) Split the database and have something within the startup form or autoexec that checks against a record and either refreshes the links to the backend or deletes the backend if found or complains if the backend is missing.
2) Use a variant of the shelled script (see
post here by jforbes or by
twinnyfoin the same thread.- I've use a variant of these so it does work well) wherein one would only delete the file. There us a variant wherein one can shell out a script and do the same from there.
In both cases the user can bypass this behavior if they so desire. The second case depends on the fact that IT hasn't disabled or set group policy to prevent scripting etc... and if the user is like me, they have backups of anything worthwhile.
>> If you're looking to delete a record, then you need to build a query that returns that record. I usually do this as a two stage by building the select query first and then converting it into an action query. From there it's a simple matter of how to call, either directly from stored object or via VBA execute methods.