Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369

    Unanswered: possible to make parts of a recordset read-only?

    In a table I have a "verified" Yes/No field.
    On one of the forms I want to give users access to update those of the records that are NOT verified yet, but still be able to see the verified ones.

    I think I can do a check for that value on the form's OnDirty event (any better choice?), but really want to know if there are smarter/easier ways of doing this. Can I set a selected subset of the Dynaset/Recordset to read-only, for example? Not only at the time of opening the form, but also directly updated if any other user is verifying a record that is currently in another users loaded form's recordset...

    Daniel

  2. #2
    Join Date
    Jan 2004
    Location
    Islamabad, Pakistan
    Posts
    97

    Smile

    use the following on the "On Current" event of the form to open it for editing or block it for any editing

    Form.AllowEdits = IIF([Verified] = Yes, True, False)

    I hope this will help.

    regards,
    Saqib
    Last edited by Saqib; 03-11-04 at 06:38.

  3. #3
    Join Date
    Nov 2003
    Location
    Europe
    Posts
    369
    Originally posted by Saqib
    use the following on the "On Current" event of the form to open it for editing or block it for any editing

    Form.AllowEdits = IIF([Verified] = Yes, True, False)

    I hope this will help.

    regards,
    Saqib
    Sure did :-) Thanks!

    BTW: - for others' reference:

    With the method above, all fields on the form is affected, so if there are any dynamically calculated fields on the form, they will display #Error...

    Another alternative for this is setting each field to locked/unlocked:

    If Me.chkExchVer = -1 then
    Me.txtField1.Locked = True
    ... etc. (more fields)
    Else
    Set each desired field locking to False:
    ... (fields listing)
    End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •