Results 1 to 6 of 6
  1. #1
    Greycom4 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    10

    How to have Page Tabs focus on record.

    I'm trying to setup a database that has multiple page tabs to disply information held in multiple tables.
    Each table has a common PK that appears in every table for each Customer. I would like to be able to setup a search box in the first page tab to search for a specific Customer ID and then
    click on each tab to view the details relating to the searched key. So for example search on a known Customer ID and then click on the Customers Tab, Customer orders Tab, Customer payments Tab, Customer Returns Tab and see each record without having to search again. Any help / advice would be most welcome.



    Thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Each tab should have a SubForm on it. That will allow each tab to look at a different table if you want. Your "Search" should be on the main form and not the tab control. Each SubFormControl should have their LinkMaster/ChildFields properties set to the PK returned in your search. The LinkMasterFields property should point to the control on the Main Form that contains the value.
    In re-reading your post, are you saying that each table has the same PK value as the PK for the table?

  3. #3
    Greycom4 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    10
    Thanks for your reply RuralGuy. Your suggestion is making sense and you are correct that many (not all) of the tables are related through a unique number (similar to a National Insurance Number). I also have a number of 'many 2 many' and 'one 2 many' tables but these would not form part of the Page Tab requirement.

    Each SubFormControl should have their LinkMaster/ChildFields properties set to the PK returned in your search
    .

    I'm familiar with the LinkMaster/ChildField, but can you explain how I can acheive this, do I need to write some VBA to make this happen ? Really appreciate you help on this.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    The SubFormControl has two special properties called LinkMasterFields and LinkChildFields that can keep a MainForm on which it resides and the SubForm that it is displaying synchronized. If these two properties point to values on the MainForm (LinkMasterFields) and SubForm (LinkChildFields) that the two forms have in common then the SubFormControl will match them up for you with no code involved.

  5. #5
    Greycom4 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    10
    Hi, i thought I had updated the post. Just wanted to thank you RuralGuy for your explanation and assistance which was spot on and works really well.
    Cheers.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    You're very welcome.

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

Similar Threads

  1. Focus on subforum page
    By rumenrs in forum Forms
    Replies: 2
    Last Post: 04-13-2013, 12:29 PM
  2. Replies: 1
    Last Post: 03-05-2013, 06:38 PM
  3. Replies: 1
    Last Post: 11-21-2012, 08:18 AM
  4. Set Focus to subfrm on Tabbed Page
    By libraccess in forum Forms
    Replies: 3
    Last Post: 06-30-2012, 07:44 AM
  5. Option Control to hide/show page tabs
    By tandridge in forum Forms
    Replies: 3
    Last Post: 12-08-2011, 10:15 AM

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