Current year date

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi

Advice on how to achive the following would be appreciated.

On a form the user has to input a date e.g. 15/08/06

On a report we would like use that date to give the first day of the same
year and also the last day of that same year i..e 01/01/06 & 31/01/06.

Using Access 2002

TIA

Tom
 
Hi Tom,

Use the following code:

datBeginDate "01/01" & DatePart("yyyy", datYear)
datFinishDate "31/12" & DatePart("yyyy", datYear)

You can then enclose this in a Format("dd/mm/yy" datBeginDate) if you
feel it necessary.

Good luck,

Nick
 
Thanks Nick works a treat

Tom
Nick 'The database Guy' said:
Hi Tom,

Use the following code:

datBeginDate "01/01" & DatePart("yyyy", datYear)
datFinishDate "31/12" & DatePart("yyyy", datYear)

You can then enclose this in a Format("dd/mm/yy" datBeginDate) if you
feel it necessary.

Good luck,

Nick
 
Back
Top