Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Protect a record of a table

Discussion in 'Information Technology' started by GL, Jul 28, 2006.

  1. GL

    GL
    Expand Collapse
    Guest

    Hi,
    I’d like to set default values for the fields of a record that a user should
    not be able to change or delete the record.
    Is it possible ?

    Thanks
    GL
     
  2. Loading...

    Similar Threads Forum Date
    Protective Cushion For My Kara Questions and Answers Sep 19, 2016
    Hard Talk State Versus Individual - Protection For Sikhs To Not Have Their Turbans Removed At Airports Hard Talk Jun 21, 2016
    The Black Teen Who Protected a White Man From an Angry Mob Continues to Inspire Inspirational Stories Nov 5, 2013
    Leisure Stomach Protection / Prevention for travelling to India?? Business, Lifestyle & Leisure Oct 18, 2013
    Legal Protect Your Places of Worship (Download the US Government Guide) Breaking News Jul 8, 2013

  3. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    GL,

    It is certainly possible to set default values for fields. And you can
    also set up your forms in such a way that the user cannot edit the data.

    However, I'm not all that clear what you want to do. What you told us
    would mean that every record would be the same as each other, and could
    not be changed, which doesn't seem right. Can you give an example?

    --
    Steve Schapel, Microsoft Access MVP

    GL wrote:
    > Hi,
    > I’d like to set default values for the fields of a record that a user should
    > not be able to change or delete the record.
    > Is it possible ?
    >
    > Thanks
    > GL
     
  4. GL

    GL
    Expand Collapse
    Guest

    When a new record is added to a form I want its fields to take the values of
    a certain record as default values. These values are set in limit to list
    comboboxes. So the user is free to change these values to the new record but
    not to change the values of the original record or delete it.
    In other words I want to protect just a one record of the table the one that
    I have set the default values.


    "Steve Schapel" wrote:

    > GL,
    >
    > It is certainly possible to set default values for fields. And you can
    > also set up your forms in such a way that the user cannot edit the data.
    >
    > However, I'm not all that clear what you want to do. What you told us
    > would mean that every record would be the same as each other, and could
    > not be changed, which doesn't seem right. Can you give an example?
    >
    > --
    > Steve Schapel, Microsoft Access MVP
    >
    > GL wrote:
    > > Hi,
    > > I’d like to set default values for the fields of a record that a user should
    > > not be able to change or delete the record.
    > > Is it possible ?
    > >
    > > Thanks
    > > GL

    >
     
  5. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    GL,

    Here are a few random thoughts, which I hope will help.

    It is unusual to want to take the default values from an existing
    record. Can you say why you want to do this? If the values in the
    "default" record will be changed from time to time, then I suppose it
    could make some sense. Otherwise, why not just set the default values
    in the table design or form design?

    Another approach might be to create a separate table, solely to hold the
    values you want to lookup for your defaults for new records. That way,
    you wouldn't need to worry about the record being edited in the working
    form.

    Another approach might be to use the form's Record Source to make the
    record holding the default values in accessible. In other words, base
    the form on a query, and in the query you can set the criteria so that
    the record with the defaults is not included.

    Another approach might be to use code to handle this. For example, on
    the form's Before Update event, something like this...
    If Me.DoodadID = 77 Then
    MsgBox "Must not change this record."
    Cancel = True
    Me.Undo
    End if

    --
    Steve Schapel, Microsoft Access MVP

    GL wrote:
    > When a new record is added to a form I want its fields to take the values of
    > a certain record as default values. These values are set in limit to list
    > comboboxes. So the user is free to change these values to the new record but
    > not to change the values of the original record or delete it.
    > In other words I want to protect just a one record of the table the one that
    > I have set the default values.
    >
     

Share This Page