Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to calculate for last 3 months datas from a table

Status
Not open for further replies.

tecassitant

Technical User
Dec 30, 2002
32
US
hai,

i am stuck up with this problem.i have a table with many fields and i want to know the details for last 3 months refering to a field called po_date field.
that is i should keep a option button or check box and saying that as last 3 months if i click that button or box it should throw me the details for the last three months.
i have criteria for this they are :
1) if i click the button or option box in the month of 4 it should thow the details from the table for the month 3,2,1
and if i am doing it on 2 of 2003 it should give me the details for 1 2003 and 12 2002,11 2002.(that is it should see this criteria in the po_Dt field in the table and throw me the datas from the table for me from my table)

is this possible , if yes please help me

have a nice day!!!!!!!!!!!!!!!!!!
 
The criteria goes something like this:
po_Dt between DateSerial(Year(Date()), [txtMonth]-3, 1) and Date()


Basically DateSerial() builds a date based on the Year, Month, and Day parameters. Look in the help for details -- basically for the first day of 3 months ago, you do "DateSerial(Year(Date()), Month(Date()) - 3, 1). The only difference between this and the above is that you're pulling your info from a specific textbox instead of the Date() function.
--
Find common answers using Google Groups:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top