Button Control on Tab-Control Pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3655

    #46
    ijared:
    Members not authorised to edit and change details shouldn't.
    For a rather involved but very effective means for accomplishing this, please refer to this Article about User Permissions and Customized Menus in MS Access.

    Comment

    • ijared
      New Member
      • May 2018
      • 25

      #47
      Hi, there are lots of stuff going on here and don't even know where to start from my old database, attaching te Sub-Forms.
      I don't even now what help the Sub-Forms will do.
      Ijared

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #48
        Did we finally get this thread closed?

        ijared...

        After how many posts?
        One of the reasons that there is a lot going on in this thread is because you've been very unclear with your goals; however, I think I now have an idea where you are going with this so as promised in post#45 the data base.

        A few disclaimers:
        - I've spent WAY too much time on this database example
        - It is NOT fully 3NF - Normally I would have tables for addresses and telephone numbers in addition to the people table
        - I would normally split this in to a front/back-end database
        - Not everything is completely error-trapped in the VBA and there may be a few glitches here and there :)

        The main form will open when you open the database
        100_MainMenu
        Unbound form - has four controls
        + text box with the datasouce to the subform 110 named [ctrl_Parent_Lin k]
        + subform control [ctrl_Subform_11 0] - there are no linked fields for this control
        + Subform control [ctrl_subform_12 0] - Master Fields = ctrl_ParentLink and Child Fields = pk_people
        - You have to hand enter the values for the linking fields, you cannot use the [...] button you will receive an error about unbound forms.
        + Button with the event code to delete the selected individual in the [ctrl_Subform_11 0].form

        110_PeopleList
        Bound to the [t_People] table, "continuous forms" view
        The toggle button is something I've used in anther database. When the recordsource is True (-1) then you can see the text, when false the text is hidden - all without VBA! It's a trick with the formatting. Other than the toggle button, nothing really fancy here.

        120_PeopleProfi le
        Bound form to [t_People]
        Tab_Control with two Pages.
        Page1 has a subform control [ctrl_SubForm_12 1]; Master fields = PK_People and the Child fields = fk_people nothing special about this arrangement. With the value from 100_MainMenu.ct rl_SubForm_110. form![CurrentRecord] captured in 100_MainMenu.[ctrl_Parent_Lin k] passed to the bound form the related records are filtered out
        Page2 has controls that display the related records in [t_people] for the record selected in 100_MainMenu.ct rl_SubForm_110. form![CurrentRecord]

        121_PeopleSkill Profile
        Bound form to [q_dataset_Form1 21] continuous forms view for the records related as passed through the parent/child form link

        I've added a query that will recover deleted users from the [Copy Of t_People] table back to [t_People] so that one can experiment with deleting members without losing the data

        Code behind all of the updating and linking is all at the form level. Really shouldn't be anything too exciting there other than the code to check that the parent form is loaded.

        Hopefully this is all fairly intuitive.

        A few screen shots...
        Randomly selected one of the records...
        this shows the page1 of the tab_control which shows the subform loaded into the tab_Page

        and here's with page2 of the tab_control which shows the details of the related record selected on left.


        >So, at this point, if thing's don't follow for you then I'm at a loss
        Attached Files

        Comment

        • ijared
          New Member
          • May 2018
          • 25

          #49
          Hi , On the Sub-Forms I have attached to the form, should I the table with all the fields?

          Comment

          • PhilOfWalton
            Recognized Expert Top Contributor
            • Mar 2016
            • 1430

            #50
            A quick look at you Db looks OK

            I think it is pretty but unnecessarily complicated

            I spent i5 minutes creating a very basic form – it’s ugly, has not been formatted, but works very simply.

            I think that gives you what you are after

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #51
              PhilOfWalton
              I had thought about placing he subform 121 directly on the main form (100) pulling the other demographics to the main form as well - I have a somewhat similar form to the one you have created that I use for some things in the lab; however, the topic is about tab-controls so that was my starting point.

              The ComboBox is a nice addition for the people search and is something I use very often for such tasks.

              However, looking at the form that OP posted #11 it looked like he has a lot of information to present (don't really know) so a tab-control might be reasonable to group related data.

              OP has provided very little in the way of how the database is constructed.

              ijared
              Hi , On the Sub-Forms I have attached to the form, should I the table with all the fields?
              This depends on your database design.
              A query may be enough to pass the data through; however, your question leads me to suspect that you do not understand the database design.
              Perhaps you should look a the form PhilOfWalton appended to the database in his post.
              Last edited by zmbd; Jul 27 '18, 07:17 PM.

              Comment

              • ijared
                New Member
                • May 2018
                • 25

                #52
                Thanks. I will look at it.

                Comment

                Working...