Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    query join (2000)

    Hello, on a form I have a combo where the entries come from a query with the values from one field in a table, I need within that combo (not concatenated) names from a different table of users, say Name A from one table and Name B from another, is there a way I can model the field on the query to show the values in a list.

    Thanks.

  2. #2
    4 Star Lounger
    Join Date
    May 2003
    Location
    Manchester, Gtr Manchester, England
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query join (2000)

    Union queries eh? Never been there, thanks Hans, a new world awaits.

    Cheers Darren.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: query join (2000)

    Do you want the dropdown list in the combo box to display names from two different tables? If so, you can create a union query and use that as Row Source for the combo box:

    - Create a new query in design view.
    - Close the Show Table dialog without selecting a table.
    - Select View | SQL.
    - Type an SQL statement like the following, using the appropriate field and table names, of course:

    SELECT [LastName] FROM <!t>[Table1]<!/t>
    UNION
    SELECT [LastName] FROM <!t>[Table2]<!/t>
    ORDER BY [LastName]

    - Switch to datasheet view to check that the query returns the names you want.
    - Close and save the query.
    - Enter its name in the Row Source property of the combo box.

    Note: you can't view a Union query in design view, only in datasheet view and SQL view.

    If you meant something different, please explain.

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: query join (2000)

    Just a reminder - you cannot edit data in a union query, only view it.
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •