List box assistance

I have a dbase with two tables (table1 and table2) in a one-to-many relationship. On a form (form1) i have a list box that is populated througha query and is based on information in fields form both tables. The problem I am running into is that when there are multiple records in table 2, there are multiple "entires" in the list box. What i want to do is poulate the list box with records that corresponds to the records in table1 but pulls information from both tables. I have tried setting Unique values/unique records in the query properties to no avail.

A list box work more accurate while called from a keyed field (No Duplicate)
from table 1.
If the field intended to use as the list box field is not a keyed filed,
first used a query to group the required field.
then create the list box with this query to call up the record from the
query that you join table1 and table 2
Pls reply if further help required.
Lim K F

When you only want one record from table2 for each table1 record, grouping is the way to go. Something like the following should work:
select table1.field1, table1.field2, min(table2.field7) AS field7,
min(table2.field9) AS field9
from table1 join table2 on table2.key1 = table1.key
group by table1.field1, table1.field2;
HTH,
Martin
> I have a dbase with two tables (table1 and table2) in a one-to-many
> relationship. On a form (form1) i have a list box that is populated through a
> query and is based on information in fields from both tables. The problem I
> am running into is that when there are multiple records in table 2, there are
> multiple "entries" in the list box. What i want to do is populate the list box
> with records that correspond to the records in table1 but pull information
> from both tables. I have tried setting Unique values/unique records in the
> query properties to no avail.

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.