Results 1 to 9 of 9
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    Subform disappears


    All, using 2016, I have a form with 2 subforms. I don't want users to be able to make changes just able to view records. I have a combo box on the main form to select the corresponding records in the subform...I set the allow additions and data entry to No in the subforms property..when the form opens or there are no corresponding records, the subform disappears..otherwise, the forms are fine and the users cannot make any changes. Can anyone give me a way I can make this form view only without the user being able to make changes pls? Thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,537
    Have you tried setting the subforms Enabled property to No
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,537
    Have you tried setting the subforms Enabled property to No?
    You may need to also change the Allow Additions amd Data Entry properties.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Don't know the whole picture but sometimes setting the form recordset to snapshot is enough.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    When New Records can't be added (as in AllowAdditions set to No) and there are no existing Records in the Recordset...everything disappears...including the Controls themselves.

    Untested...but try changing AllowAdditions to Yes on the Forms that the Subforms are based on...and set the Locked Property to Yes on the Subform Controls.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Quote Originally Posted by Bob Fitz View Post
    Have you tried setting the subforms Enabled property to No?
    You may need to also change the Allow Additions amd Data Entry properties.
    Thanks Bob...It worked but I can't use the record selector... Close though

  7. #7
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    If you set the Enabled back to Yes...and the Locked Property to Yes, as I suggested...you can use the Record selector but cannot Add/Edit Records.

    Setting the AllowAdditions Property to Yes on the Forms that the Subforms are based on will show the Subform even if no Records exist.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  8. #8
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Quote Originally Posted by Missinglinq View Post
    If you set the Enabled back to Yes...and the Locked Property to Yes, as I suggested...you can use the Record selector but cannot Add/Edit Records.

    Setting the AllowAdditions Property to Yes on the Forms that the Subforms are based on will show the Subform even if no Records exist.

    Linq ;0)>
    Guess my last post didn't make it last night. I did as you suggested and it worked as I needed. Thanks so much!

  9. #9
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Good luck with your project!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Custom Menu Disappears
    By kepha12 in forum Access
    Replies: 8
    Last Post: 05-06-2019, 01:39 PM
  2. Replies: 4
    Last Post: 12-06-2012, 10:03 AM
  3. Replies: 1
    Last Post: 11-15-2012, 11:38 PM
  4. Subform Disappears
    By Huddle in forum Forms
    Replies: 3
    Last Post: 05-30-2012, 07:02 AM
  5. wor document disappears
    By hornet385 in forum Access
    Replies: 1
    Last Post: 07-14-2010, 01:30 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