Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Subform Locking (2003)

    Hi All,
    I am working with a form that contains a subform. When I load the form, I test for a condition. If the condition is true, I want to prevent the user from changing the contents in the subform. What is the proper command / syntax to make this work?

    Thanks,
    Mark

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

    Re: Subform Locking (2003)

    To disable editing the subform you can use

    Me.SubformName.Form.AllowEdits = False

    where SubformName is 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. To see the control name, open the main form in design view and click once on the subform. The title bar of the Properties window (and the Name property, of course) will show the name you need.

Posting Permissions

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