Oh, my! I *really* messed up that reply! Let me try again....
"Tony Toews [MVP]" wrote:
> If you visit http://www.mvps.org/access/tables/tbl0009.htm you will
> see somewhat different code which does a .RefreshLink. and doesn't
> do the .Append.
This function looks like a better solution than the one I found in the MS
Access Security FAQ. I ran it while logged-in as myself (the db owner with
full rights) and it worked flawlessly. However, when I logged-in as DemoUser
with limited rights, I get 3033 permission errors.
Just to rephrase what I'm doing...
The demo database contains dummy data. DemoUser has Open/Run privilages on
the demo database and ReadDesign/ReadData privilages on all of the tables in
the database. (In case it matters, these privilages aren't assigned directly
to the DemoUser account but, rather, are assigned to a DemoUser group that
DemoUser belongs to.)
In the destination database (balloons_PRG.mdb), DemoUser has OPenRun
privilages on the database and full privilages on all of the tables. Again,
these are assigned through a DemoUser group that DemoUser belongs to.
Because Access uses the "most restrictive" privilages on linked tables,
DemoUser's privilages to the demo database's tables is downgraded to
ReadDesign/ReadData only because that's what the demo MDB file assigns.
What I need is a way to connect to the "real" database or "demo" database
based on whether the logged-on user is DemoUser. The code in the Form_Open
event of my startup form goes like this:
If CurrentUser = "DemoUser" then
' Code to link to the demo database goes here
Else
' Code to link to the real database goes here
End If
Thanks for any help or guidance you can provide.
Regards, Chris