Preventing user from opening accde directly but only via another access database.

I recommend you wrap Command in the Trim function. I once found that in an extra space got added to the value. No idea why, but it was as if you could only pass strings in chunks and anything less got padded. I passed Otto Mayshun and a trailing space was passed to the Command function. Someday you might use this with a word that has a different length and wonder why it doesn't work.
 
For info, I have just created a thread in the code repository showing how the UserControl property can be used to restrict how an application can be opened:
https://www.access-programmers.co.uk/forums/showthread.php?p=1654125#post1654125

It includes two simple examples each containing a Starter app and a Main app, each with one form:
a) BlockDBOpenDirect (similar to this thread request) - the Main app can be opened via the Starter app but cannot be run directly
b) BlockDBRemoteAccess - the exact opposite - the Main app can be run directly but cannot be opened remotely using automation
 

Users who are viewing this thread

Back
Top Bottom