Results 1 to 3 of 3

Thread: access 2003

  1. #1
    Lounger
    Join Date
    Apr 2008
    Location
    Jacksonville, North Carolina, USA
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello all, I was wondering if anyone knows how to diable the editing on the form besides turning off the allow edits in the property sheet. Is it possible to turn it off for tha whole form using vb code. Thank you in advance.

  2. #2
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can try using the

    Me.AllowEdits = True (or false)

    based on conditions for the form. I use this all the time and it works great. You would need to go to the code window for specific event on the form, like On Open for instance, and add the code there.

    Mark

    [quote name='Bighale' post='783238' date='06-Jul-2009 13:10']Hello all, I was wondering if anyone knows how to diable the editing on the form besides turning off the allow edits in the property sheet. Is it possible to turn it off for tha whole form using vb code. Thank you in advance.[/quote]

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi,

    There are a couple of options you could try.

    In the forms current event type:
    [codebox]
    With Me
    .AllowAdditions = False
    .AllowDeletions = False
    .AllowEdits = False
    End With[/codebox]

    I think the code is self describing, however if you want the user to have the option of editing the field (say), add this to a command button on click event.

    [codebox]
    With Me
    .AllowAdditions = True
    .AllowDeletions = True
    .AllowEdits = True
    End With
    Me.cmdEditButton.Caption = "Edit Mode On"[/codebox]

    The beauty of this is that once they click the button they can edit the current record but as soon as they click or tab out the editting is disabled.
    Jerry

Posting Permissions

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