MS Access Tab Control with Multiple Subforms

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 พ.ย. 2024

ความคิดเห็น • 23

  • @huytruong2026
    @huytruong2026 3 ปีที่แล้ว

    Hi, your video is incredibly useful. I don't know why you haven't made any video in the last two years. If possible, could you please post more? Thank you!

  • @eddie4969
    @eddie4969 8 ปีที่แล้ว +1

    I found your project and explanation very useful and easy to follow. much appreciated.

  • @janezklun
    @janezklun 9 ปีที่แล้ว +1

    Nice approach between tab control with subforms,
    Thank you for sharing

  • @fabig8125
    @fabig8125 8 ปีที่แล้ว

    This is a incredibly useful alternative to setting up tab controls. Thank you!

  • @Hamidali-mx8iv
    @Hamidali-mx8iv 2 ปีที่แล้ว

    Great. Can we use option group to open multiple sub forms like this?

  • @jeffreybonto4173
    @jeffreybonto4173 2 ปีที่แล้ว

    Very efficient indeed! Great idea & thanks for sharing!

  • @VoMinhHai1914
    @VoMinhHai1914 5 ปีที่แล้ว

    Thank you so much. I love your video so much.
    I hope one day, you can make tutorial video about chart in access by VBA,can't you?

  • @johnhuson7055
    @johnhuson7055 3 ปีที่แล้ว

    This is great and really useful, however now I have the event control on the tab control, everytime a tab is clicked everything in the details section re-draws. Is there a way to stop this?

  • @ioannisgiannopoulos8999
    @ioannisgiannopoulos8999 5 ปีที่แล้ว

    The XML and VBA can no longer be found at the referenced page. Can you please provide them again? Thank you.

  • @abeibrahim5846
    @abeibrahim5846 7 ปีที่แล้ว

    Great idea, and I thing it would be great only that we have Navigation Tab!

  • @nancyyount2186
    @nancyyount2186 4 ปีที่แล้ว

    What if I have more than one subform on a tab? I don't know anything about coding in code builder...I'm guessing this is VBA you're using? Could you demonstrate what the code would look like for, say 3 subforms on one tab?

    • @JohnSmith-th5zw
      @JohnSmith-th5zw ปีที่แล้ว

      I have the same issue. Were you able to get the code you were asking for? If so, can you share it? Thanks

    • @nancyyount2186
      @nancyyount2186 ปีที่แล้ว

      @@JohnSmith-th5zw It's been a few years since I've worked on the database I was asking about. I think the switch/case statement would be structured something like the following:
      Select Case Me.tabctlEval.Value
      Case 0
      Me.SubformContainer1.SourceObject = "subfrmTab1"
      Me.SubformContainer2.SourceObject = "subfrmTab2"
      Me.SubformContainer3.SourceObject = "subfrmTab3"
      Case 1
      Me.SubformContainer1.SourceObject = "subfrmTab4"
      Me.SubformContainer2.SourceObject = "subfrmTab5"
      Me.SubformContainer3.SourceObject = "subfrmTab6"
      Case 3
      Me.SubformContainer1.SourceObject = "subfrmTab7"
      Basically, you're saying, whatever tab number I'm clicking on, I want you to show these subforms in these subcontainers. The above would be an example of if you wanted 3 subforms to show on the first 2 tabs, and then just one subform to show on the third tab. I think that would work...but not 100% sure. I ended up going a completely different route with my database structure.

  • @RungeCarl
    @RungeCarl 3 ปีที่แล้ว

    Brilliant!!!

  • @johnukos
    @johnukos 7 ปีที่แล้ว

    I like this method,however my subform is not syncing with the parent as i change records in the parent. could you help with this?
    thanks!

    • @Accessjitsu
      @Accessjitsu  7 ปีที่แล้ว

      When you design a form like this, where you can put different sub-forms in the same sub-form container, I think it breaks the normal way we link sub-forms to parent forms. Usually, you would use the Link Master and Child Fields settings in the property to grid to sync your forms. But I don't think this works if you switch out the sub-forms in the container. I use a function that gets the record key from somewhere on the parent form or a public variable, and I put that in the SQL (record source) that populates each sub-form that can go into that sub-form container. an example: "SELECT * FROM ReferralBackground WHERE EvaluationID=GetInitialEval(); " GetInitialEval is a public function that gets the primary key off of the parent form. I put this in the "Record Source" property of the form so it executes when the form is loaded to the sub-form container. Now if you are going to allow navigating to a different record on the parent form while the sub-form stays loaded, you'll need to put code in the parent form's "on current" event procedure that tells the sub-form to refresh itself - maybe requery. Or you can call a public function that is inside the sub-form that will cause it to refresh itself.

    • @johnukos
      @johnukos 7 ปีที่แล้ว

      thanks for replying! I am trying to do as little coding as possible and found that using the relationships window to link the primary index of the parent table to a link field in child table does the job for me. I can see your way being more flexible, like if i were to want to have the option of changing the data source of the subform on the fly. l am using your subform container and isolated tab control method and love it!

    • @johnukos
      @johnukos 6 ปีที่แล้ว

      haha, decided to ditch linking with relationships window after all. I tried using a query with the main form id as the criteria. The data synced fine as i changed records on the main form, I could see the data previously entered in my subform change too but when i tried to enter data it wouldnt stick..ie it wouldnt update the table. I ended up using objSubform.LinkMasterFields and objSubform.LinkChildFields to get everything working. I found a simple example of this here .....www.databasejournal.com/features/msaccess/article.php/3599781/MSAccess-Load-Subforms-Dynamically.htm

  • @scottnorman2296
    @scottnorman2296 7 ปีที่แล้ว

    Great tip! Thank you!

  • @mikeygrey9855
    @mikeygrey9855 ปีที่แล้ว

    I asked chatGPT to fix me up something like this but couldn't do it.
    Thanks

  • @BIM-Orbit
    @BIM-Orbit ปีที่แล้ว

    It didnt work for me! :(
    Private Sub form_Load()
    Me.TAB1.Value = 0
    TAB1_change
    End Sub
    ----
    Private Sub TAB1_change()
    Select Case Me.TAB1.Value
    Case 0
    Me.SubCont.SourceObject = "00_Main-Menu"
    Case 1
    Me.SubCont.SourceObject = "01_Project-List"
    Case 2
    Me.SubCont.SourceObject = "02_Add-Project"
    Case 3
    Me.SubCont.SourceObject = "03_Whiteboard"
    Case 4
    Me.SubCont.SourceObject = ""
    Case 5
    Me.SubCont.SourceObject = ""
    Case 6
    Me.SubCont.SourceObject = ""
    Case 7
    Me.SubCont.SourceObject = ""
    Case 8
    Me.SubCont.SourceObject = ""
    End Select
    End Sub

  • @arundeeplotus4539
    @arundeeplotus4539 6 ปีที่แล้ว

    very low sound...

  • @napmendoza1968
    @napmendoza1968 4 ปีที่แล้ว

    Your audio is terribly low!