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

Report Formatting for Next Month Check

Status
Not open for further replies.

Thedoc56

MIS
Mar 20, 2002
2
US
I am trying to write a report that looks at a date in the database, compares the month to the current month + 1, and only shows records that meet the criteria and not all records. The expression will check a date ("POL_EFF") that is already in the database and add one month to it then show only records that comply. What am I doing wrong in my syntax?

If Month(Date) = Month("POL_EFF")
Then DateAdd("m", 1,Month( "POL_EFF"))
Thedoc
 
You should be using the function "DatePart". Search the help file for details on syntax.
 
You can also use DateSerial

'the next month
DateSerial(Year(POL_EFF), Month(POL_EFF) + 1, 1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top