part date ?

  • Thread starter Thread starter flash
  • Start date Start date
F

flash

HI
I want to add the current month to my table each time a record is added so I
can query by calendar month is this possible if so how I can add whole date
but am unsure how to then set up query to only return info for that month ??
and help would be great
 
Use a calculated field in a query:
MonthOnly: Month([DateTimeFieldName])

then do the search on this field.
 
Do you want to add the whole date or just the month? Your post says both.
which is it?

To add the month, simply create a field (text or number depending) and then
default it on your forms to pull the month from the current date...

=DatePart("m",Date())

If you put in the whole date and later want to test for a particular onth,
you would need to add a new column to your query that pulls out the month
and then test for it in the criteria...

MonthAdded: DatePart("m",[DateAdded])



Hope that gets you on the right path,

Rick b




HI
I want to add the current month to my table each time a record is added so I
can query by calendar month is this possible if so how I can add whole date
but am unsure how to then set up query to only return info for that month ??
and help would be great
 
I want to add the current month to my table each time a record is
added so I can query by calendar month

You do not make it clear whether a calendar month is "all the Januaries
ever", or "January 2004".

If it's the latter, use a text format like

Format(Date(), "yyyy-mm")

and a query like

WHERE "2003-01" <= UpdateDate
AND UpdateDate <= "2003-12"

Hope that helps


Tim F
 
Back
Top