Re: Change User Permissions thru Code

Tech-Archive recommends: Speed Up your PC by fixing your registry

anonymous_at_discussions.microsoft.com
Date: 06/09/04

  • Next message: troy: "Re: two seprate passwords. One for admin the other for users"
    Date: Wed, 9 Jun 2004 13:43:08 -0700
    
    

    Changing the record souce is not an option because the
    products contain many different fields. I thought about
    putting each subform in the form and changing the
    visibility, but I figured there had to be a better way. I
    saw something called SetPermissions, but I can't get the
    code to compile. The error message is "Cant find project
    or library". It stops on adPermObjProviderSpecific. I
    pretty sure I have all of the necessary references
    checked. Below is the code I am using.

    Dim Cat As New ADOX.Catalog
    Dim lngPermissions As Long

    Cat.ActiveConnection = CurrentProject.Connection

    (This is all one line)
    lngPermissions = Cat.Groups("Users").SetPermissions
    ("frmForm", adPermObjProviderSpecific, adAccessGrant,
    adRightFull, adInheritBoth, Form)

    >-----Original Message-----
    >Rather than inserting a subform, you could (depending on
    the circumstances)
    >
    >a) change the recordsource for the subform
    >or
    >b) create multiple subforms, and set the visibility of
    the subform controls
    >depending on the product selected.
    >
    >--
    >Joan Wild
    >Microsoft Access MVP
    >
    >"Geoff" <anonymous@discussions.microsoft.com> wrote in
    message
    >news:19d8101c44d90$078f2eb0$a401280a@phx.gbl...
    >> I am having a problem with the user and group
    permissions
    >> in an access 2000 database. The rights are set up so
    that
    >> the users cannot view or make any design changes. One
    of
    >> the forms has a subform that changes depending on what
    >> product was selected. When a user attempts to open this
    >> form, they receive an error stating that they do not
    have
    >> permission to insert another object into a form. I was
    >> wondering how I could change the permissions in vb to
    >> allow the user to insert the subform and then change it
    >> back.
    >> Thnak you in advance for any help you can offer.
    >> Geoff
    >
    >
    >.
    >


  • Next message: troy: "Re: two seprate passwords. One for admin the other for users"

    Relevant Pages

    • Re: Change User Permissions thru Code
      ... Rather than inserting a subform, you could (depending on the circumstances) ... "Geoff" wrote in message ... > I am having a problem with the user and group permissions ...
      (microsoft.public.access.security)
    • RE: "if" program difficulties
      ... I want to open one of two tables depending on the value in ... "Canine" I want to open FelineShotRecords. ... as the SubForm "PetTable". ... CustomerID from the CustomerTable linking to both shot records. ...
      (microsoft.public.access.formscoding)
    • Re: tab control & user level security
      ... form with some 10 subforms for which permissions need to be checked) ... > - The new system has a main form M with a tab control with form F as a ... That procedure would search the form for subform ...
      (microsoft.public.access.forms)
    • Re: tab control & user level security
      ... form with some 10 subforms for which permissions need to be checked) ... > - The new system has a main form M with a tab control with form F as a ... That procedure would search the form for subform ...
      (microsoft.public.access.security)
    • Re: Hide Controls in Subforms
      ... >Depending on the user level I want some controls to be hidden so I used ... >the following code in the Form Open Event of the Subform ... It might be simplest to use a Continuous Form instead of a Datasheet, ... visible or invisible depending on the value of Level. ...
      (microsoft.public.access.forms)