query month and year only

L

LKnomad

Hi,

I need to pull records into a drop down menu based on the month and the
year. To clarify: I have a date field formatted as 2/21/05. I need
to query the month and years that exist in my table. For example I
might have two entries for feb 05 - 2/4/05 and 2/8/05. I need to have
one feb 05 in my drop down menu without the days.

Anyone have any ideas??

Thanks

Laura K
 
P

Pieter Wijnen

select distinct month(datefield) & year(datefield) from thetable will
achieve that part of your problem....

HTH

Pieter
 
L

LKnomad

Thanks for the reply,

The formatting works and displays as month and year. I still have the
problem of multiple month and year combos. The actual dates are
different so they can not be grouped by using distinct. However the
month and year combos are the same. how do I get access to show only
one of each month and year combo?

Thanks
Laura K
 
Top