Current year 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
 
N

Nick 'The database Guy'

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
 
T

Tom

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top