Results 1 to 4 of 4
  1. #1
    TriciaLSU is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    2

    Unhappy HELP - trying to fix Form with Tabs and subforms

    Hi,
    Please bare with me as I ask the questions below...I am not quite sure how to explain what I am talking about, but I am going to give it a shot. I have been working on a particular form in my database that has tabs built into it. I may have built this wrong, but I will explain what I did. My first tab is the "Main Details" tab - this is populating my order assignments table. The second tab is the "status information" tab - which is also populating the order assignments table. I used a subform to put that information on the second tab (which I am thinking maybe I shouldn't have done). The Third tab is the "NCR log" tab - which populates a different table, my ncr table, and the Fourth Tab is the "SR Log" tab - which populates a third table, my SR table.
    The information populates all of the tables correctly as I have them set up right now.
    I went into the properties of my Form and locked the form from any editing, additions or deletions, then I created a button on the top of my form that has to be clicked to turn those features back on.
    I used the following code behind the button:
    Me.AllowAdditions = true
    Me.AllowEdits = true
    Me.AllowDeletions = true

    The code worked perfectly to turn back on the editing functions on the form on the MAIN DETAILS tab of my form. Here is where I hit my problem. If I am entering information on a NEW record, and I go to click from my main details tab to my status information tab (which contains the subform that populates the same table as the main details tab) the sub form does not appear on the tab. The subforms do not appear on the third and fourth tab either. After looking at other records in the database that DO have information in them already, I am assuming that the new record's tabs do not show the subforms if there is no information populated in the fields of the tables that the forms are based on.

    If I am wanting to have that second tab show the sub form with the blank fields, how do I make that happen? I want the form to always show information.

    If I remove the Button and change the form back to allow all additions/edits/deletions, this problem goes away.

    Any help someone can give me on this would be greatly appreciated.

    I can be emailed at tricia77@bellsouth.net


    Thanks so much!!!!!!

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    your post is a bit hard to follow; but I think you have correctly identified the issue - a subform will be vacant if Additions property is off and there is no record.

    so you can play with tactically turning that back on, but instead locking the fields. or you could stuff a dummy record so there is data always but that's really not a great idea. or you could have a label that says There Is No Data and tactically make that visible...

    Hope this helps a little and Roll Tide !

  3. #3
    TriciaLSU is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    2
    Thanks for confirming the information.
    Is there a way to go into the code on the button and ask it to specifically turn back on the additions/edits/deletions on the subforms when that button is clicked?
    For example,
    right now I have
    me.AllowAdditions = true
    Can you add some sort of property like
    Me.subfrmName.AllowAdditions = true?

    Just wondering if something like that would work.

    Thanks again,
    and Geaux Tigers - hope to see y'all in the Nat'l Championship!

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    AllowAdditions is a property of any form object. a subform is a form object. And so it can be set dynamically.

    As noted in my first post, an alternative to using this property is to lock the individual fields themselves. If feasible it avoids the blank form phenomena that you discovered.

    hope it helps

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

Similar Threads

  1. Subforms with Tabs in Access 2003
    By jaypoppin in forum Forms
    Replies: 3
    Last Post: 05-03-2011, 04:44 PM
  2. 1 Form used to open Multiple Tabs
    By joefonseca79 in forum Forms
    Replies: 3
    Last Post: 03-08-2011, 09:42 PM
  3. Form tabs
    By Tareq_1993 in forum Forms
    Replies: 1
    Last Post: 11-28-2009, 01:23 PM
  4. Tabs will not display in Form View
    By dharriet in forum Forms
    Replies: 1
    Last Post: 06-29-2009, 08:28 AM
  5. Printing all tabs on one form
    By sshafer1 in forum Access
    Replies: 0
    Last Post: 12-06-2007, 07:47 PM

Tags for this Thread

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