A.D. Tejpal
adtp at airtelmail.in
Sun Aug 29 22:15:09 CDT 2010
Brad, My sample db named Form_SearchByMultipleListBoxes might be of interest to you. It is in access 2000 file format and is available at Rogers Access Library. Link: http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=45 The sample also covers multiple selection in the list box. Best wishes, A.D. Tejpal ------------ ----- Original Message ----- From: Brad Marks To: accessd at databaseadvisors.com Sent: Sunday, August 29, 2010 18:29 Subject: [AccessD] Two “Related” List Boxes on a Single Form I have just started to experiment with Parent-Child List Boxes on a single form. I have developed a method that works, but I would like to know if I am on the right track. Perhaps there is a better method that people with more experience use. For experimentation purposes, I am using a simple example. The Parent List Box is set up for “Country” – Only two countries are in it, “Canada” and “US” The Child list box is set up for Provinces/States I have set up this function ~~~~~~~~~~~~~~~~~~~~~~ Global Country_Selected Function Function_Country_Selected() Function_Country_Selected = Country_Selected End Function ~~~~~~~~~~~~~~~~~~~~~ In the Parent List Box there is a “On Click” Event Procedure with this code Country_Selected = List0 (Plus code to Requery the Child List Box) ~~~~~~~~~~~~~~~~~~~~~ In the Criteria in the Query for the Child List Box I have this line Function_Country_Selected() ~~~~~~~~~~~~~~~~~~~~~ Again, this method seems to work. I am just curious if this is the approach that others use, or is there perhaps a better method. Thanks, Brad