Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Posts
    157

    Unanswered: if inactive then don't allow additions or edits or deletions

    I want to do some thing like the following ie if a field on the current form has a value of inactive then do not allow additions, deletions or edits.

    I pulled the following code from the access help but I am missing something because I keep on getting and error message "object required".

    Can you please give me some advise here on what I am missing from the code. I am using access 2003.

    thanks heaps



    Private Sub Form_Current()

    If Me.[Active/Inactive].Value = "Inactive" Then

    With frm
    .AllowAdditions = False
    .AllowDeletions = False
    .AllowEdits = False
    End With
    Else
    With frm
    .AllowAdditions = True
    .AllowDeletions = False
    .AllowEdits = True
    End With
    GoTo Exit_Form_Current
    End If

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    The Object required error is presumably highlighting "With frm".
    Try With Me instead.

  3. #3
    Join Date
    May 2002
    Posts
    157

    Thanks heaps works perfectly

    Thanks heaps works perfectly

Posting Permissions

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