|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
set query permissions in VBAI have a form which has a button that runs code to create a new query in VBA
every time it is clicked (the old query is first deleted). I would like other users to be able to run this code also, but have not found a way to set the permissions in VBA to do give them permissions for this query. I'm sure there must be a way. Can anyone help? Many thanks!!!!! On Thu, 3 May 2007 14:26:00 -0700, CathyJ <Cat***@discussions.microsoft.com> wrote:
>I have a form which has a button that runs code to create a new query in VBA In the User and Group Permissions dialog (Tools - Database Security - User and Group Permissions), select Query in the>every time it is clicked (the old query is first deleted). I would like other >users to be able to run this code also, but have not found a way to set the >permissions in VBA to do give them permissions for this query. Object Type dropdown, then provide the relevant group full permissions (or whatever subset is appropriate) for the <New Tables/Queries> Object Name. Now when a new query is added, the Group you selected earlier will have the permissions you indicated. Scott McDaniel scott@takemeout_infotrakker.com www.infotrakker.com Thanks Scott.
I tried giving both the user and the group Read, Update, Insert & Delete permissions for New Queries, and I still get the same error. Could it have something to do with the Tables being in a different place (back-end)? This user has full permissions for those tables. Or do I need to give her Administer access? I'd hate to start doing that, although it doesn't really matter since she can't get to it anyway. Thanks in advance! Show quote "Scott McDaniel" wrote: > On Thu, 3 May 2007 14:26:00 -0700, CathyJ <Cat***@discussions.microsoft.com> wrote: > > >I have a form which has a button that runs code to create a new query in VBA > >every time it is clicked (the old query is first deleted). I would like other > >users to be able to run this code also, but have not found a way to set the > >permissions in VBA to do give them permissions for this query. > > In the User and Group Permissions dialog (Tools - Database Security - User and Group Permissions), select Query in the > Object Type dropdown, then provide the relevant group full permissions (or whatever subset is appropriate) for the <New > Tables/Queries> Object Name. Now when a new query is added, the Group you selected earlier will have the permissions you > indicated. > > Scott McDaniel > scott@takemeout_infotrakker.com > www.infotrakker.com > you should look up
GRANT EXECUTE in SQL Server books online you shouldn't use DAO crap for this; it's ridiculous because DAO has been depecrated Show quote "CathyJ" <Cat***@discussions.microsoft.com> wrote in message news:A2BB5B21-7BA1-443B-9C7C-E3DE42FD1D84@microsoft.com... > I have a form which has a button that runs code to create a new query in VBA > every time it is clicked (the old query is first deleted). I would like other > users to be able to run this code also, but have not found a way to set the > permissions in VBA to do give them permissions for this query. > > I'm sure there must be a way. Can anyone help? > > Many thanks!!!!! Thanks Aaron.
could you please send me a link to an SQL server book that has this in it? I'm not a programmer, just a lowly marketing type! You would probably have a heart attack if you saw my code. Show quote "Aaron Kempf" wrote: > you should look up > > GRANT EXECUTE > > in SQL Server books online > > > > you shouldn't use DAO crap for this; it's ridiculous because DAO has been > depecrated > > > "CathyJ" <Cat***@discussions.microsoft.com> wrote in message > news:A2BB5B21-7BA1-443B-9C7C-E3DE42FD1D84@microsoft.com... > > I have a form which has a button that runs code to create a new query in > VBA > > every time it is clicked (the old query is first deleted). I would like > other > > users to be able to run this code also, but have not found a way to set > the > > permissions in VBA to do give them permissions for this query. > > > > I'm sure there must be a way. Can anyone help? > > > > Many thanks!!!!! > > > Ignore Aaron, a bitter and unhappy troll who hates Access, and who has taken
up residence here of late. There are perfectly valid reasons for using SQL server, but they probably don't apply to the current project. Show quote "CathyJ" <Cat***@discussions.microsoft.com> wrote in message news:10C6B034-DF0A-49D8-9F5C-D66B7B07D53B@microsoft.com... > Thanks Aaron. > > could you please send me a link to an SQL server book that has this in it? > I'm not a programmer, just a lowly marketing type! You would probably have > a > heart attack if you saw my code. > > "Aaron Kempf" wrote: > >> you should look up >> >> GRANT EXECUTE >> >> in SQL Server books online >> >> >> >> you shouldn't use DAO crap for this; it's ridiculous because DAO has been >> depecrated >> >> >> "CathyJ" <Cat***@discussions.microsoft.com> wrote in message >> news:A2BB5B21-7BA1-443B-9C7C-E3DE42FD1D84@microsoft.com... >> > I have a form which has a button that runs code to create a new query >> > in >> VBA >> > every time it is clicked (the old query is first deleted). I would like >> other >> > users to be able to run this code also, but have not found a way to set >> the >> > permissions in VBA to do give them permissions for this query. >> > >> > I'm sure there must be a way. Can anyone help? >> > >> > Many thanks!!!!! >> >> >> The users would need at minimum read data permissions on the source tables involved in this query.
-- Show quoteJoan Wild Microsoft Access MVP "CathyJ" <Cat***@discussions.microsoft.com> wrote in message news:A2BB5B21-7BA1-443B-9C7C-E3DE42FD1D84@microsoft.com... >I have a form which has a button that runs code to create a new query in VBA > every time it is clicked (the old query is first deleted). I would like other > users to be able to run this code also, but have not found a way to set the > permissions in VBA to do give them permissions for this query. > > I'm sure there must be a way. Can anyone help? > > Many thanks!!!!! they have read, update, insert & delete permissions for the four tables
involved in the query. in both the back-end module and the front-end one (I never know if they need both, so I err on the side of safety). thanks Show quote "Joan Wild" wrote: > The users would need at minimum read data permissions on the source tables involved in this query. > > > > -- > Joan Wild > Microsoft Access MVP > "CathyJ" <Cat***@discussions.microsoft.com> wrote in message news:A2BB5B21-7BA1-443B-9C7C-E3DE42FD1D84@microsoft.com... > >I have a form which has a button that runs code to create a new query in VBA > > every time it is clicked (the old query is first deleted). I would like other > > users to be able to run this code also, but have not found a way to set the > > permissions in VBA to do give them permissions for this query. > > > > I'm sure there must be a way. Can anyone help? > > > > Many thanks!!!!! > Do any of those four tables have lookup fields defined in them? If so then they need permissions on those as well.
It would help if you posted the text of the error message that occurs when users run the code. -- Show quoteJoan Wild Microsoft Access MVP "CathyJ" <Cat***@discussions.microsoft.com> wrote in message news:DA4C162D-BEA0-4EE4-805C-651FBA4CD17E@microsoft.com... > they have read, update, insert & delete permissions for the four tables > involved in the query. in both the back-end module and the front-end one (I > never know if they need both, so I err on the side of safety). > > thanks > > "Joan Wild" wrote: > >> The users would need at minimum read data permissions on the source tables involved in this query. >> >> >> >> -- >> Joan Wild >> Microsoft Access MVP >> "CathyJ" <Cat***@discussions.microsoft.com> wrote in message news:A2BB5B21-7BA1-443B-9C7C-E3DE42FD1D84@microsoft.com... >> >I have a form which has a button that runs code to create a new query in VBA >> > every time it is clicked (the old query is first deleted). I would like other >> > users to be able to run this code also, but have not found a way to set the >> > permissions in VBA to do give them permissions for this query. >> > >> > I'm sure there must be a way. Can anyone help? >> > >> > Many thanks!!!!! >> |
|||||||||||||||||||||||