Transfer data from one list box to the other

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hulas
    New Member
    • Mar 2008
    • 18

    Transfer data from one list box to the other

    I am designing a database prototype for my senior design class, and there are is a problem that I don't have any idea about where to even start. So, anybody out there, I will highly appreciate if you can take some of your precious time to help me out.

    Consider I have a list box with three attributes (State, Region, and City) of an entity called Country. I should be able to select one or more than one of these attributes and there values should show up in another list box. These values may be repeated, but I only want unique values in the list box. For example for State there might be two entries: New York and New York, but I only want to see one entry in the second list box. Again, I should be able to select one or more than one of these values from the second list box and the corresponding country name should show up in the third list box. For example if I select New York and California from the second list box, than the corresponding country names which are stored in the table "Country" should show up in the third list box.

    I look forward for some help.

    Thank you
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Have a look at this tutorial on Cascading combo/listboxes. You will need to adapt the query for the row source of the second listbox slightly. Something like ...

    .RowSource = "SELECT DISTINCT [" & Me!List0 & "] " & _
    "FROM Country "

    ...where List0 is the name of the first listbox

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32656

      #3
      You refer obliquely to multiple selections in your listboxes. Are you talking about multi-select listboxes?

      Can you confirm that the fields that are included in the selection process are [Country], [Region], [State] & [City]? Presumably all fields in your [Country] table.

      I'm having big trouble understanding your comment :
      Originally posted by Hulas
      Consider I have a list box with three attributes (State, Region, and City) of an entity called Country. I should be able to select one or more than one of these attributes and there values should show up in another list box.
      Is this three columns that are visible in a single ListBox?
      How would it be possible to select an individual column in a ListBox?

      I'm sure I have the wrong end of the stick somewhere, but that's what your post says so perhaps you could clarify a little.

      Comment

      Working...