Displaying a month of records in a form.. based off one date

R

roadie.girl

I'm trying to show all of the records for a month on a form.

On "SelectDate" form, I have where the user can select whatever date
they want to. Then on the next form, i want it to display a month's
worth of data ...

so if they select 1/2/2006 - it would display the ENTIRE month of
january.
if they select 4/5/2005 - it would display the ENTIRe month of April of
05.

now the table that the form is based on has a "Date" column in it - so
that is how i am selecting the proper date.

Is there any way to do this? I think i'd need to do it on my underlying
query for the form, but i'm not sure...

thanks in advance for any help!
 
F

freakazeud

Hi,
create a query based of your table. In this query create a new column which
will only pull the month of the date. Something like this:

YourMonth: Month([YourDateField])

Now in the criteria of this new column reference the control on the form
where the user is entering the date with:
Month([Forms]![YourForm]![YourControl])

Base the other form on this query and you should get only results based on
the month entry. The form where the date is inputted needs to be open at
query run!
This is untested, but should get you the idea.
HTH
Good luck
 
R

roadie.girl

yes .. that's exactly what i was looking for .. no clue the Month
function existed.

thanks so much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top