Page 1 of 3 123 LastLast
Results 1 to 15 of 41
  1. #1
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22

    Creating a Multi Tab Form

    Hi Forum,

    Does anyone have any good video links to create a Tabbed Form in access 2013?
    I've seen some good ones where the subforms are built on queries and then the fields are used to ensure each form updates to the same Customer id as you select different tabs.
    I've created one form which uses a Blank form and then a Tabbed form is dragged into the space, then the Existing fields can be dragged onto the form. Next step is to insert a page, then insert another subform and connect the primary key.
    Once this is done then the 2 forms change records without a problem.

    The problem is that when I try to repeat this process to add another tab, I create new form the same way, but there there's no connection to the Customer ID?


    Any suggestions welcome.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Are you building a Navigation Form or using Tab control?

    I am not quite understanding what the issue is. If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    video not really needed.
    put 1 subform on top of the tab control, then put this code at Tab CHANGE event.
    When user clicks the tab, the control will swap out the subform needed:

    Code:
    Private Sub TabCtl_Change()
         
    Select Case TabCtl.Value
       Case 0
          subFrm.RowSource = "fPaymentsSub"
       Case 1
          subFrm.RowSource = "fPurchasesSub"
       Case 2
          subFrm.RowSource = "fInventorySub"
    End Select
    End Sub

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    @ranman265, do you mean subFrm.SourceObject ?

    So you mean have a subform sitting over tab control but not on a page of tab control?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Join Date
    Apr 2017
    Posts
    1,687
    1. You create an unbound main form (e.g. fMain), and add a tab control (e.g. tbcMain, with pages e.g. pgCustomers, pg..., etc.) into it;
    2. You create several continous forms - a form with customers table as source (e.g. fCustomers), and additional forms with tables having CustomerID as FK;
    3. You open main form in edit mode, activate leftmost page of tab control (pgCustomers) there, and drag customers form into it, creating customers subform. You rename subform (e.g. sfCustomers - access gives subform same name as it's source form, and it isn't best idea);
    4. You insert an unbound textbox (e.g. txtCustomerID) into main form, and either you enter formula there to return active CustomerID from fCustomers in sfCustomers, or you use Current event of fCustomers to store current CustomerID into txtCustomerID in fMain;
    5. You add other forms into according pages of tabMain as subforms. Set for every subform e.g. LinkChildFields = 'CustomerID', and LinkMasterFields = 'txtCustomerID'. You rename subforms properly.

    It's generally all!

  6. #6
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551
    Hi all!

    Peter,

    There is a similar thread with an attached sample database that you may find useful:
    https://www.accessforums.net/showthr...776#post453776

    Cheers,
    John

  7. #7
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22
    Thanks to all for your responses. I've attached my db so you can see how I've built it & see that the last 3 tabs don't connect to the first tab. My method was to create queries to be the dataset for the forms, all forms are Single Froms. I've then created a blank form form added a Tabbed control, added a subform and inserted the Forms one by one. Can anyone explin why I can't get the forms to link and show me an example on my example? Thanks.
    Attached Files Attached Files

  8. #8
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22
    Thanks John, I've had a look but still can't work it out, I've attached a copy of DB to the post, Thanks Peter

  9. #9
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22
    Thanks June7, Thanks, I've attached a copy of DB to the post, Thanks Peter

  10. #10
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22
    Thanks ArviLaanemets, I've tried following your instructions, but still can't work it out, I've attached a copy of DB to the post, Thanks Peter

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    I don't understand table relationships. tblMarket and tblPayments are linking to tblBilling on Company, not Customer. If this is correct linking then why is CustomerID even in tblMarket and tblPayments?

    Certainly should not duplicate customer name into tblPayments.

    Who is billed and makes payments - customer or company?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  12. #12
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22
    Hi June7,
    I see what you mean, I've overdone the fields as I wasn't sure what I need for the joins. The design idea should be that One Customer can have work done by more than one Company and have Marketing and Payments data for each Company.
    One of the videos I watched advised to use a query as the dataset for the Forms, but I could only get the Customer & Billing forms to always select the same Customer ID and Company ID when I clicked through the Tabs. When I tried to add a new page to the tabbed control, I couldn't get them to change records. Does that help? Let me know if I can explain more. Thanks Peter

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Customers get billed for work done by some company and customers make payments directly to company and can use different methods.

    Still unclear why tables are structured as they are. Why does tblPayments have multiple credit card fields as well as fields for Cash, Paypal, etc?

    Advise not to use spaces nor punctuation/special characters (underscore only exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #14
    PeterB is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2020
    Posts
    22
    Thanks, I'm looking for the correct structure if mine are wrong and an understanding of why. Can you show me how you would do it.

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,953
    Maybe, if you could answer question asked and better describe data relationships and business process.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating a multi variable Search Form
    By AccessUser12345 in forum Forms
    Replies: 3
    Last Post: 10-14-2016, 01:36 PM
  2. Creating database for Multi User
    By zahin in forum Database Design
    Replies: 3
    Last Post: 07-05-2014, 11:21 AM
  3. Replies: 2
    Last Post: 01-26-2013, 11:38 PM
  4. Replies: 3
    Last Post: 10-31-2012, 05:04 PM
  5. Problem creating Multi level list boxes - pleas help!
    By AccessConfused in forum Access
    Replies: 6
    Last Post: 10-24-2010, 09: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