Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Forms

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-08-2009, 10:33 AM
newbie newbie is offline Windows XP Access 97 (version 8.0)
Novice
 
Join Date: May 2009
Posts: 16
newbie is on a distinguished road
Cool Need Duplicate List Box

I have a form that contains tab. Tab 1 and 2 display information based off of a list box selection. The list box is identical on both tabs. I would like for them to by in sync. So, if a user selects item 1 on tab 1 when they go to tab 2 item will will be highlighted in the listbox. Is this possible?
Reply With Quote
  #2  
Old 05-08-2009, 01:21 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

If you put just one ListBox on the form instead of a page of the tab, it will show up on both tabs. Does that help?
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #3  
Old 05-08-2009, 01:23 PM
newbie newbie is offline Windows XP Access 97 (version 8.0)
Novice
 
Join Date: May 2009
Posts: 16
newbie is on a distinguished road
Default

That is how I had it originally, however the list box does not pertain to all the other tabs that I have, so I was loosing a lot of space to display information.
Reply With Quote
  #4  
Old 05-08-2009, 01:55 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

I thought you only had two tabs, sorry. How about playing with setting it invisible when you are on a page where you don't want it? You can use the Tab Control's Change event for this.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #5  
Old 05-08-2009, 02:13 PM
newbie newbie is offline Windows XP Access 97 (version 8.0)
Novice
 
Join Date: May 2009
Posts: 16
newbie is on a distinguished road
Default

Can you give more detail on this option? I placed the listbox on the form, so it now displays on all of my tabs (pages). Then I went to one of the pages I do not want the list box to be visible on and accessed the properties/events. The only events I can see are On Click, On Double Click, On Mouse Down, On Mouse Move, and On Mouse Up.
Reply With Quote
  #6  
Old 05-08-2009, 02:33 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

You are on a Tab Page. You need to select the TabControl which is usually named TabCtl & number. The Index of the TabControl tells you what page you are on so you can just have a case statement to set the visible property of the ListBox.
Code:
Private Sub TabCtl0_Change()
   Select Case Me.TabCtl0.Value
      Case Is < 2
         Me.ListBoxName.Visible = True
      Case Else
         Me.ListBoxName.Visible = False
   End Select
End Sub
...using your control names of course.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #7  
Old 05-11-2009, 06:26 AM
newbie newbie is offline Windows XP Access 97 (version 8.0)
Novice
 
Join Date: May 2009
Posts: 16
newbie is on a distinguished road
Default

You are amazing!!! This worked perfect. This coding stuff is adicting :0)

Thanks for all you help.
Reply With Quote
  #8  
Old 05-11-2009, 07:45 AM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

Glad that worked for you and you're welcome. Try the link in my sig.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
List box to populate other list boxes Nathan Forms 0 03-03-2009 04:22 PM
Duplicate command button brettg Database Design 1 08-04-2008 02:16 AM
Duplicate add to new table horseyshoe Access 3 09-01-2006 05:51 AM
Which duplicate? grgerhard Import/Export Data 1 05-27-2006 04:19 AM
duplicate autonumber rayc Access 0 01-16-2006 06:57 AM


All times are GMT -8. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.