Results 1 to 12 of 12
  1. #1
    Orlando2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    5

    The same record selected in each list box within the form with tabs

    I have a form with 3 tab controls. Within each tab, there is a bound list box that lists records based on a combo box selection. All list boxes are bound to the same table and records in each tab will be in the same order.
    Tab1, listbox1:Field1, Field2, Field3, Field4
    Tab2, listbox2, Field1,Field2, Field5, Field6
    Tab3, listbox3:Field1, Field2, Field7, Field8,Field9
    I would like the same record be selected in each list box within the tabs, e.g. when record #2 is selected on tab1, the same record will be selected on tab2 and tab3, or if I click on tab 2 again and change the selection to record #3, record #3 will be selected on tab1 and tab2.


    Any suggestions? I've tried various searches with no luck.

  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,922
    You know you can place your ListBox on the TabControl such that there is only one ListBox and it appears on all tabs, right?

  3. #3
    Orlando2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    5
    Could you provide more details or some example? I am a newbie to Access.
    My listboxes within tabs are based on the same table but won't have the same number of variables.

  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,922
    I'm not sure what you are doing but if you 'CUT' one of the ListBoxes from a tab and then paste it back on your form without selecting a tab first, the List box is really on the main form and not the TabControl. Slide it over the TabControl and you will see that the tab pages are really transparent and the ListBox now appears to be on all of the tabs. You could do the same with the other controls that are shared in common with all of the tabs.

  5. #5
    Orlando2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    5
    I did this. I copied the same listbox into each Tab. What I need is, when record #2 is elected on Tab1 I want record #2 be selected on Tab2 and Tab3. I have atttached screen shots how it should be. I will appreciate your help.Click image for larger version. 

Name:	Tab1.jpg 
Views:	18 
Size:	27.4 KB 
ID:	13825Click image for larger version. 

Name:	Tab2.jpg 
Views:	16 
Size:	41.8 KB 
ID:	13826Click image for larger version. 

Name:	Tab3.jpg 
Views:	16 
Size:	27.4 KB 
ID:	13827
    Quote Originally Posted by RuralGuy View Post
    I'm not sure what you are doing but if you 'CUT' one of the ListBoxes from a tab and then paste it back on your form with out selecting a tab first, the List box is really on the main form and not the TabControl. Slide it over the TabControl and you will see that the tab pages are really transparent and the ListBox now appears to be on all of the tabs. You could do the same with the other controls that are shared in common with all of the tabs.

  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,922
    Is there something wrong with having the same control on all three pages of the tab control? It looks like it would do what you want to me.

  7. #7
    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,922
    If you want, just post your db and I'll do it for you to show you what I mean. It looks like a test db to me but if not then remove any sensitive data first.

  8. #8
    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,922
    Ahh...it appears the RowSource of each ListBox is different for each tab. Is that correct?

  9. #9
    Orlando2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    5
    Yes, it is correct. I attached the sample database. Thanks1
    Quote Originally Posted by RuralGuy View Post
    Ahh...it appears the RowSource of each ListBox is different for each tab. Is that correct?
    Attached Files Attached Files

  10. #10
    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,922
    See if this works for you.
    Attached Files Attached Files

  11. #11
    Orlando2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    5
    Yes, it works!!!
    Thank you so much, you saved my life
    Quote Originally Posted by RuralGuy View Post
    See if this works for you.

  12. #12
    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,922
    Excellent! Glad we could help.

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

Similar Threads

  1. Replies: 10
    Last Post: 10-10-2011, 08:08 PM
  2. Replies: 7
    Last Post: 08-19-2011, 02:57 PM
  3. Replies: 4
    Last Post: 06-16-2011, 09:30 PM
  4. Data Entry Form: Retain Selected List Box Value
    By William McKinley in forum Forms
    Replies: 1
    Last Post: 11-05-2010, 10:14 AM
  5. Loading the form with selected record
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-09-2005, 07:49 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