Button Control on Tab-Control Pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ijared
    New Member
    • May 2018
    • 25

    Button Control on Tab-Control Pages

    I have a single form with a Tab Control containing 4 tabs with list boxes on 2 tabs. I have navigation tabs on the first tab and it controls all the tabs. The list boxes contains different data.

    I want the navigation tabs to work only in tabs 1 and 2 but a second navigation tab to work on tabs, 3 and 4.

    How do I go about that?
    Last edited by zmbd; Jul 23 '18, 09:02 PM. Reason: [z{renamed the thread based on ijared's posts}]
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3655

    #2
    ijared,

    I would love to help, but your description is a bit confusing.

    I know what a Tab Control is, but what do you mean by "navigation tabs"?

    Is this within the confines of a Navigation Form?

    Any additional information you can provide would help guide us to a solution.

    Comment

    • ijared
      New Member
      • May 2018
      • 25

      #3
      It is the Navigation Buttons that starts with First Back Next Last New to create or edit records.

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3655

        #4
        ijared,

        This is not helping much.

        At this point, I have no idea whatsoever what you are talkling about.

        There are Navigation Forms--which is a type of form) and there are Navigation Controls that can be displayed on your ordinary forms. You can also create Command buttons that perform the same functions as the Navigation Controls.

        However, you still haven't explained anything about the navigation buttons/tabs/controls being on the first tab of your Tab Control, nor what you are really trying to do.

        You have to give us ample information if you want any type of assistance on this forum.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32645

          #5
          Originally posted by TwinnyFo
          TwinnyFo:
          You have to give us ample information if you want any type of assistance on this forum.
          Or anywhere. That's the point.

          We don't demand you work for your supper. We merely request the most basic understanding of what you're trying to ask about. No-one anywhere can help you unless you express what it is you want help with. We're not here to demonstrate psychic abilities.

          Comment

          • zmbd
            Recognized Expert Moderator Expert
            • Mar 2012
            • 5501

            #6
            Clarify

            From ijared second description it sounds like the record-navigation controls
            [IMGnothumb]https://bytes.com/attachment.php? attachmentid=95 32[/IMGnothumb]
            iJered
            Open your form... windows 7 and newer has the Snipping tool, use that tool to capture an image of your form.

            Under the reply box there is a button labeled [Advanced]
            [IMGnothumb]https://bytes.com/attachment.php? attachmentid=95 33[/IMGnothumb]
            click on this button which will take you to the advanced post editor where you can upload the image to your post...
            [IMGnothumb]https://bytes.com/attachment.php? attachmentid=95 34[/IMGnothumb]
            please don't use links to third-party image sites as these are often blocked by company firewalls - upload image from your PC to the site.

            In this case, a picture will be worth a thousand words!
            Attached Files
            Last edited by zmbd; Jul 13 '18, 04:36 AM.

            Comment

            • ijared
              New Member
              • May 2018
              • 25

              #7
              Tab Control on certain pages

              It directs the images I have on the different tabs. I want the navigation tabs to work only for 1 and 2 tabs and a second button to control tabs 3 and 4 but a second navigation tab to work on tabs, 3 and 4.
              [IMGNOTHUMB]https://bytes.com/attachments/attachment/9538d1531495949/navigation-buttons.jpg[/IMGNOTHUMB]
              Attached Files
              Last edited by NeoPa; Jul 13 '18, 05:51 PM. Reason: Made pic viewable.

              Comment

              • twinnyfo
                Recognized Expert Moderator Specialist
                • Nov 2011
                • 3655

                #8
                I want the navigation tabs to work only for 1 and 2 tabs and a second button to control tabs 3 and 4 but a second navigation tab to work on tabs, 3 and 4.
                Please explain what you mean, as you have mentioned this before and it didn’t make sense either. Your picture, although it might have helped, now adds more confusion, because you have now shown us TWO sets of navigation buttons.

                Please provide more details of what you are trying to do, not just repeating what we don’t understand.

                Comment

                • zmbd
                  Recognized Expert Moderator Expert
                  • Mar 2012
                  • 5501

                  #9
                  @ ijared
                  While I appreciate the effort to provide only the pertinent parts of your form - what I asked you for was a FULL capture of your form so that we can see what you have done.

                  Also do you understand what the main intent of the TabControl was originally designed for? Are you using subforms within your TabControl?

                  @ twinnyfo
                  :)
                  Piecing together what we have:
                  - I would appear that OP has found a form or control that is similar to what is needed
                  - From the sniped image it looks like a Main Form with some home-grown-record-navigation buttons (HGRN)with the HGRN siting on main form and OP has neglected to remove the standard form-record-navigation when the TabControl was inserted on the main form

                  !! now for the huge guess
                  OP wants one set of HGRN to work for
                  Me.ctrlTab.Page index = 1 and 2

                  and a different set of HGRN for
                  Me.ctrlTab.Page index = 3 and 4


                  There is really no need for a second set of HGRN as one can simply pull the index:

                  and then perform a set of actions depending on the active page.

                  You can get a bit more granular by naming the tab-pages and calling them directly... FMSINC has a nice tutorial and a sample database that shows this code.
                  FMS: Reference Tab Pages by its PageIndex Rather than Tab Value on Microsoft Access Forms

                  I further suspect that the native record controls need to be hidden; however, without the full form image capture it's impossible to tell.
                  Last edited by zmbd; Jul 14 '18, 02:33 AM. Reason: [z{with NeoPa's blessing added link to fellow MVP's article}]

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32645

                    #10
                    BTW As FMS Inc is a web page provided by another Access MVP (My friend and colleague Luke Chung) I believe that linking to there is acceptable.
                    Last edited by zmbd; Jul 14 '18, 02:30 AM. Reason: [z{with your blessing I will add the link :) }]

                    Comment

                    • ijared
                      New Member
                      • May 2018
                      • 25

                      #11
                      Tab Control on certain pages Reply to Thread

                      Hi,
                      I hope this image will help. As I said before, I want the navigation tabs to work only for 1 and 2 tabs and a second button to control tabs 3 and 4.but a second navigation tab to work on tabs, 3 and 4.
                      ijared
                      [imgnothumb]https://bytes.com/attachments/attachment/9543d1531584322/test22.jpg[/imgnothumb]
                      Attached Files
                      Last edited by twinnyfo; Jul 14 '18, 04:17 PM. Reason: Made image viewable

                      Comment

                      • twinnyfo
                        Recognized Expert Moderator Specialist
                        • Nov 2011
                        • 3655

                        #12
                        Apparently we are not making ourselves clear enough. Your description still does not make any sense.

                        As I said before
                        The first few times you said the same thing, and we still don’t understand. Perhaps describe it differently, rather than saying the same thing and assuming we will somehow figure out what you mean.

                        I want the navigation tabs to work only for 1 and 2 tabs
                        What are “navigatio n tabs”?? If all your tabs are linked to the same set of records, then it doesn’t matter, and navigation will affect all tabs.

                        a second button to control tabs 3 and 4
                        Is this “button” the same as your “navigatio n tabs”? Consistent language is not just helpful, it is a necessarily when working on a forum like this. Concerning just tabs 3 & 4, see above.

                        but a second navigation tab to work on tabs, 3 and 4.
                        Is this a typo? Is this something different than your “second button”? Is this another control? What is a “navigatio n tab”?

                        I hope you can appreciate the immense level of patience many of the experts on this forum have already exercised with this thread. Believe it or not, we really do want to help you. However, every time we ask for additional details, you never answer our questions directly and seem to only restate what you have already stated. We cannot help you if you don’t provide us meaningful descriptions of what we ask for.

                        Comment

                        • PhilOfWalton
                          Recognized Expert Top Contributor
                          • Mar 2016
                          • 1430

                          #13
                          Unlike Neopa, I am psychic ( well partially).

                          I think what ijared wants is to show his custom command buttons for "First", "Next", "Back" & "Last" only when Pages 1 and 2 of his Tab control are active.

                          I am not psychic enough to understand on which pages he wants to display "Delete" & "New"

                          "but a second navigation tab to work on tabs, 3 and 4." eludes me completely.

                          If, ijared, when you reply, please use the correct terms, and then we will be able to help.

                          At the bottom of your form you have 6 Command Buttons:- "First", "Next", "Back", "Last", "Delete" & "New"

                          The 4 items at the top of the form which I can't read but start with "vo" or "No Longer" are Pages on a Tab Control

                          If you click immediately to the right of the last page "Volutoor #" the property box will confirm that you are on a Tab Control

                          Phil

                          Comment

                          • ijared
                            New Member
                            • May 2018
                            • 25

                            #14
                            Sorry for the disturbance it is taking. The navigation tabs are the 6 Command Buttons:- "First", "Next", "Back", "Last", "Delete" & "New" showing in the picture and I understand that the navigation will affect all tabs.
                            I waant it to affect only the first 2 tabs so the 3 and 4 tabs will not be affected.

                            My command buttons have the follwing codes:
                            Code:
                            Private Sub cmdBack_Click()
                                On Error Resume Next
                                DoCmd.GoToRecord , , acPrevious
                            End Sub
                            
                            Private Sub cmdFirst_Click()
                                On Error Resume Next
                                DoCmd.GoToRecord , , acFirst
                            End Sub
                            
                            Private Sub cmdLast_Click()
                                On Error Resume Next
                                DoCmd.GoToRecord , , acLast
                            End Sub
                            
                            Private Sub cmdNew_Click()
                                On Error Resume Next
                                DoCmd.GoToRecord , , acNewRec
                            End Sub
                            
                            Private Sub cmdNext_Click()
                                On Error Resume Next
                                DoCmd.GoToRecord , , acNext
                            End Sub
                            To PhilOfWalton,
                            The last tab says No Longer Volunteer. It's just a title.
                            ijared
                            Last edited by NeoPa; Jul 15 '18, 05:31 PM. Reason: Added mandatory [CODE] tags.

                            Comment

                            • NeoPa
                              Recognized Expert Moderator MVP
                              • Oct 2006
                              • 32645

                              #15
                              Originally posted by IJared
                              IJared:
                              I want it to affect only the first 2 tabs so the 3 and 4 tabs will not be affected.
                              In that case convert the code to use the VBA objects rather than the DoCmd macro commands. It does mean you'll have to issue each command for both Pages though. There are no Tabs. Tab Controls have Pages, not Tabs.
                              As an example, your cmdFirst_Click code might look something like :
                              Code:
                              Private Sub cmdFirst_Click()
                                  With Me
                                      Call MoveRec(frmMe:=.{NameOfSubformOnTab1}.Form, strType:="First")
                                      Call MoveRec(frmMe:=.{NameOfSubformOnTab2}.Form, strType:="First")
                                  End With
                              End Sub
                              
                              Private Sub cmdLast_Click()
                                  With Me
                                      Call MoveRec(frmMe:=.{NameOfSubformOnTab1}.Form, strType:="Last")
                                      Call MoveRec(frmMe:=.{NameOfSubformOnTab2}.Form, strType:="Last")
                                  End With
                              End Sub
                              
                              ...
                              
                              Private Sub MoveRec(frmMe As Form, strType As String)
                                  With frmMe.Recordset
                                      Select Case strType
                                      Case "First"
                                          Call .MoveFirst
                                      Case "Last", "New"
                                          Call .MoveLast
                                          If strType = "New" Then Call .MoveNext
                                      Case "Previous"
                                          Call .MovePrevious
                                      Case "Next"
                                          Call .MoveNext
                                  End With
                              End Sub
                              This all assumes the forms are not related or linked.

                              Comment

                              Working...