No, I wasn't thinking of giving him access to a table in design view. I want to be able to programmatically disassociate his copy from the master copy that others access.
There are several forms and reports which can update or display information about a particular Walk. The Registrar will need to work on one forthcoming Walk over a period of weeks, and doesn't want to have to keep re-specifying which Walk every time. So the Walks table contains a field indicating which of the 100 or so Walks is currently selected for subsequent forms or reports to act on.
But other people can have access to just one of those reports, which displays information about the selected Walk. Unfortunately I can't give him a read-only access to the database - Access doesn't work that way - so I give him access to only that report. However he also needs to be able to select the Walk he wants to report on. That involves setting the "Selected" field for that Walk in the Walks table. But I don't want that to muck up what the Registrar or others may be doing with other Walks.
Apart from the "Selected" field, the Walks table only rarely changes, so the restricted user doesn't need it to be updated in real time. Since each user has their own copy of the FE on their own computer, which accesses a common copy of the BE, the simplest solution seems to be for the restricted user to drop the link to the Walks table so he can select the Walk on his own machine. I just want the "Select Walk" facility to quietly unlink his table - he won't even know about it.
Actually, now that I come to think about it, I probably don't need to relink the table when he closes the DB. The batch file on each user's computer which invokes the FE actually copies it afresh from the cloud each time, so that when I deploy a new version everybody will get it. So they'll all get a fresh set of linked tables anyway. It just seemed aesthetically wrong to leave the table unlinked. What do you think?
I can easily pick up the Connect string from one of the other tables that never gets unlinked:
- CurrentDB.TableDefs("Walks").Connect = CurrentDB.TableDefs("Talks").Connect
All I needed was a command to reverse the effect of the DeleteObject command. But perhaps I don't need it after all?