updating a text field automatically every month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a query which looks like this

Status StatusCount StatusDate
Closed 21 Aug 2005
New 34 Aug 2005
Waiting 32 July 2005
New 2 Jan 2006
Closed 3 Sept 2005

It counts the number of workorders with certain status in respect to the
month and year. I have a form which i want to display the monthly status. i
want a text box to display the StatusCount of Closed work orders for the
current month. So when the current month & year is Aug 2005 i want the text
box to display 21. When the current month and year changes to Sept 2005, i
want the text box to automatically update its value based on Sept 2005
StatusCount for closed workorders.

Can anyone point me in the right direction?
 
Without an idea of your underlying data/table structure, this is only a
guess...

You might be able to use the Month() and Year() functions to compare your
StatusDate with the current date.

By the way, if your StatusDate is a field in a table, and if it is NOT a
date/time data type field, you will have trouble comparing an actual date
(via the Date() function) with something that is not a date.

Regards

Jeff Boyce
<Access MVP>
 
Back
Top