Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form/subform issue (2002)

    I have a form that I setup a button to allow edits to fields on the form. Works great.
    I then added a linked subform to the original form. I can not edit data on the subform.
    I asume that I have to add some code to my main form that will allow edits on the subform. I can't get the coding right.
    Here is the code behind the original edit button:

    Private Sub cmdEdit_Click()
    Me.AllowEdits = True
    Me.LNFN.SetFocus
    cmdEdit.Visible = False
    CmdSave.Visible = True
    Me.lblEditMode.Visible = True
    End Sub

    I think I have to add a line something like this:

    Forms!subformCertifiedSports.AllowEdits = True

    Doesn't work. What am I missing?

    Thanks.

    Paul

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: form/subform issue (2002)

    I'm guessing that the subform control itself has its Enabled and/or Lock properties set incorrectly.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: form/subform issue (2002)

    See Mark's reply.

    By the way, the code would look different. Subforms are not part of the Forms collection. It would be like this:

    Me!subformCertifiedSports.Form.AllowEdits = True

    where subformCertifiedSports should be the name of the subform as a control on the main form, this is not necessarily the same as the name of the subform in the database window.

Posting Permissions

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