From: Joe Gonzalez on
I have a table of just months and years for example:
2008-01
2008-02
2008-03
2008-04
2008-05
2008-06

And I have another table that is storing data that contains the date of say
2008-05.

I have a form with a drop down that displays the dates in the first table
but I want to only show dates that are not in the second table (the data
table) so for example since 2008-05 is in the data table I only want the drop
down to show
2008-01
2008-02
2008-03
2008-04
2008-06

I built the drop down as a row source and am trying to add it to a "SQL
Statement: Query Builder"

Any suggestions?

From: John Spencer on
USe the unmatched query wizard to display what you want.

It should build a query that looks like the following.

SELECT Table1.YearMonth
FROM Table1 LEFT JOIN Table2
ON Table1.YearMonth = Table2.YearMonth
WHERE Table2.YearMonth is Null



John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

Joe Gonzalez wrote:
> I have a table of just months and years for example:
> 2008-01
> 2008-02
> 2008-03
> 2008-04
> 2008-05
> 2008-06
>
> And I have another table that is storing data that contains the date of say
> 2008-05.
>
> I have a form with a drop down that displays the dates in the first table
> but I want to only show dates that are not in the second table (the data
> table) so for example since 2008-05 is in the data table I only want the drop
> down to show
> 2008-01
> 2008-02
> 2008-03
> 2008-04
> 2008-06
>
> I built the drop down as a row source and am trying to add it to a "SQL
> Statement: Query Builder"
>
> Any suggestions?
>
From: Joe Gonzalez on
PERFECT!!Thank you!

"John Spencer" wrote:

> USe the unmatched query wizard to display what you want.
>
> It should build a query that looks like the following.
>
> SELECT Table1.YearMonth
> FROM Table1 LEFT JOIN Table2
> ON Table1.YearMonth = Table2.YearMonth
> WHERE Table2.YearMonth is Null
>
>
>
> John Spencer
> Access MVP 2002-2005, 2007-2008
> The Hilltop Institute
> University of Maryland Baltimore County
>
> Joe Gonzalez wrote:
> > I have a table of just months and years for example:
> > 2008-01
> > 2008-02
> > 2008-03
> > 2008-04
> > 2008-05
> > 2008-06
> >
> > And I have another table that is storing data that contains the date of say
> > 2008-05.
> >
> > I have a form with a drop down that displays the dates in the first table
> > but I want to only show dates that are not in the second table (the data
> > table) so for example since 2008-05 is in the data table I only want the drop
> > down to show
> > 2008-01
> > 2008-02
> > 2008-03
> > 2008-04
> > 2008-06
> >
> > I built the drop down as a row source and am trying to add it to a "SQL
> > Statement: Query Builder"
> >
> > Any suggestions?
> >
>