Results 1 to 4 of 4
  1. #1
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581

    Disabling a sub form

    I have a form [frmSchMonthly] and a sub form [frmSchMonthlySubF]. If it's a new record, I want the sub form not enabled. I used this in the on current:
    If Me.NewRecord Then
    Me.frmSchMonthlySubF.Enabled = False
    Else


    Me.frmSchMonthlySubF.Enabled = True
    End If


    I got this error:
    Click image for larger version. 

Name:	Error.jpg 
Views:	8 
Size:	14.3 KB 
ID:	39290

    Not sure what I did wrong

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    See this thread mentioned in the Similar Threads at the bottom of the page.
    PBaldy provides a sample database that may help you.
    Good luck.

  3. #3
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    I used: Me.frmSchMonthlySubF.Enabled = Not IsNull(Me.MonthlySchID)
    I got the same error.
    Looking closely, I mispelled the name of the sub form in the properties. It's working now.
    Thanks

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Disabling Form Options
    By Eranka in forum Access
    Replies: 2
    Last Post: 05-27-2018, 11:41 PM
  2. Tabular form - disabling autosave
    By Jishnu Surendran in forum Access
    Replies: 2
    Last Post: 02-28-2018, 10:56 PM
  3. Disabling Access Form Selection
    By Eranka in forum Access
    Replies: 1
    Last Post: 01-23-2018, 06:31 AM
  4. Replies: 16
    Last Post: 12-12-2013, 01:23 PM
  5. Disabling form controls
    By jaymin in forum Forms
    Replies: 2
    Last Post: 06-28-2012, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums