Chat with a LIVE Microsoft Access Expert!
 
       
 

         

   

Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
 
Chat with a LIVE Microsoft Access Expert!
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-15-2007, 02:32 PM
Paul-ish Paul-ish is offline
Registered User
 
Join Date: Aug 2007
Posts: 7
Paul-ish is on a distinguished road
Question Make one control's selection determin how another control is populated

I have a list box on a form and right now the list box lets me scroll through the names of people in my database. What I want to be able to do is click on one of the names in the list box, and then a set of controls adjacent to the list will be populated with data for that person so that I can edit and view their data. Is there a tutorial or person that can tell me how to do this? Thanks!

Last edited by Paul-ish; 08-15-2007 at 02:37 PM..
Reply With Quote
Sponsored Links
  #2  
Old 08-15-2007, 06:45 PM
Pat Hartman Pat Hartman is offline
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 20,669
Pat Hartman is a jewel in the roughPat Hartman is a jewel in the roughPat Hartman is a jewel in the roughPat Hartman is a jewel in the rough
1. Create a form bound to a query that retrieves all the columns you want to display.
2. Add the listbox to the form.
3. Modify the query to refer to the listbox to limit the data displayed on the form.
Select ... From ... Where SomeField = Forms!YourForm!YourListBox;
4. In the click event of the listbox, requery the main form.
Me.Requery
That will cause the form to rerun its query which is now limited by the selection in the listbox.
__________________
Bridge Players Still Know All the Tricks
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make my tab control go away, please! kelsita_05 Forms 6 09-13-2006 08:31 AM
set value of several controls based on particular value of another control on subform ehdoh Modules & VBA 2 03-18-2004 05:48 AM
VBA code to create controls on a Tab Control DanR Forms 3 03-21-2002 02:03 PM
Make form-button that filters by selection? geir_are Forms 1 11-19-2001 12:44 PM
Copying control between tab controls arage Forms 3 01-01-2001 11:53 AM


All times are GMT -8. The time now is 10:00 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
(c) copyright 2009 Access World