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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Month Date year

Status
Not open for further replies.

corbinap

Programmer
Nov 20, 2006
34
US
i am using this code in Month fields in two subreports with two different tables (One for 2006 and the other for 2007). The problem is that < Month(date) is OK for 2006 but not for 2007. Is a way to fix or add the year for the Month(date) to see the current year.

If txtinv1.Value > txtinv1.OldValue And 1 < Month(Date)
 
You may play with the Format function:
Format(Date, "yyyymm")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top