auto write for read only users

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Laertes

    #1

    auto write for read only users

    Hi,

    I have created a DB and I want to set up a few read-only users. The
    problem is that I have a few "automated" insert/delete procedures.
    E.g. when the user logs in his name is recorded on a table. I can
    solve this problem by granitng insert access only for the specific
    table. That would be ok for this problem, but not for the one
    described below....

    Moreover, when you load the main data Form it automatically creates a
    number of records (specified by the date). When you unload it it
    deletes all the empty records. This means that either read-only users
    can't access the main data Form or theat they will have insert/delete
    access...

    Any ideas?

    thank you in advance!

    Laertes
  • Wayne Morgan

    #2
    Re: auto write for read only users

    If you are using update or append queries to make your automated entries,
    you can specify User's or Owner's permissions for the queries. This is one
    of the query properties. If you are using stored queries, right click the
    background where the tables are in the query design grid and choose
    Properties.

    --
    Wayne Morgan
    Microsoft Access MVP


    "Laertes" <bitoulis@btope nworld.com> wrote in message
    news:b2fa7acc.0 405200145.469a3 a47@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > I have created a DB and I want to set up a few read-only users. The
    > problem is that I have a few "automated" insert/delete procedures.
    > E.g. when the user logs in his name is recorded on a table. I can
    > solve this problem by granitng insert access only for the specific
    > table. That would be ok for this problem, but not for the one
    > described below....
    >
    > Moreover, when you load the main data Form it automatically creates a
    > number of records (specified by the date). When you unload it it
    > deletes all the empty records. This means that either read-only users
    > can't access the main data Form or theat they will have insert/delete
    > access...
    >
    > Any ideas?
    >
    > thank you in advance!
    >
    > Laertes[/color]


    Comment

    • Laertes

      #3
      Re: auto write for read only users

      I'm actually doing it by code... like this :

      ......

      Set rst = dbs.OpenRecords et("SELECT [date], " _
      & "Count([date]) As m FROM Selectron " _
      & "GROUP BY [date] HAVING [date] = #" &
      Format(a, "mm\/dd\/yyyy") & "#;")


      if rst!m = 1 Then
      DoCmd.GoToRecor d , , acNewRec
      Forms![Selectron]![Date].Value = a

      ......

      I tried adding WITH OWNERACCESS OPTION at the end of the recordset,
      but still it doesn't like it...

      thnx!

      Laertes

      Comment

      • Wayne Morgan

        #4
        Re: auto write for read only users

        I don't follow where you tried to add the Owner Access option. Try adding it
        here:

        Set rst = dbs.OpenRecords et("SELECT [date], " _
        & "Count([date]) As m FROM Selectron " _
        & "GROUP BY [date] HAVING [date] = #" & _
        Format(a, "mm\/dd\/yyyy") & "# WITH OWNERACCESS
        OPTION;")

        --
        Wayne Morgan
        MS Access MVP


        "Laertes" <bitoulis@btope nworld.com> wrote in message
        news:b2fa7acc.0 405200507.6a914 58e@posting.goo gle.com...[color=blue]
        > I'm actually doing it by code... like this :
        >
        > .....
        >
        > Set rst = dbs.OpenRecords et("SELECT [date], " _
        > & "Count([date]) As m FROM Selectron " _
        > & "GROUP BY [date] HAVING [date] = #" &
        > Format(a, "mm\/dd\/yyyy") & "#;")
        >
        >
        > if rst!m = 1 Then
        > DoCmd.GoToRecor d , , acNewRec
        > Forms![Selectron]![Date].Value = a
        >
        > .....
        >
        > I tried adding WITH OWNERACCESS OPTION at the end of the recordset,
        > but still it doesn't like it...
        >
        > thnx!
        >
        > Laertes[/color]


        Comment

        • Joan Wild

          #5
          Re: auto write for read only users

          Wayne Morgan wrote:[color=blue]
          > I don't follow where you tried to add the Owner Access option. Try
          > adding it here:
          >
          > Set rst = dbs.OpenRecords et("SELECT [date], " _
          > & "Count([date]) As m FROM Selectron " _
          > & "GROUP BY [date] HAVING [date] = #" & _
          > Format(a, "mm\/dd\/yyyy") & "# WITH
          > OWNERACCESS OPTION;")[/color]

          That won't work, since the 'owner' of this sql statement is the user that's
          running this code. An alternative is to create a saved RWOP query based on
          Selectron and then write the select statement against that.

          --
          Joan Wild
          Microsoft Access MVP


          Comment

          • Wayne Morgan

            #6
            Re: auto write for read only users

            Thanks, Joan.

            That makes sense.

            --
            Wayne Morgan
            MS Access MVP


            "Joan Wild" <jwild@nospamty enet.com> wrote in message
            news:10aq2hirqu a7k72@corp.supe rnews.com...[color=blue]
            > That won't work, since the 'owner' of this sql statement is the user[/color]
            that's[color=blue]
            > running this code. An alternative is to create a saved RWOP query based[/color]
            on[color=blue]
            > Selectron and then write the select statement against that.
            >
            > --
            > Joan Wild
            > Microsoft Access MVP[/color]


            Comment

            Working...