|  | Choosing date from query |  | |
| | | Secret Squirrel |  |
| Posted: Sun Sep 14, 2008 3:08 am Post subject: Choosing date from query |  |
I have a subform that lists employee review information. It is linked to my main form by the employeeID. The subform is a continuous form and shows all the past reviews for that employee. I want to be able to put on my main for the next date that employee's review is due. But I need to add 1 year to the last review date from the subform. How can I pull the most current review date from the subform and add a year to it? |
| |
| | | Steve Schapel |  |
| Posted: Sun Sep 14, 2008 3:21 am Post subject: Re: Choosing date from query |  |
Squirrel,
In the header or footer of the subform, put a hidden textbox, set its Format property to Short Date, and enter its Control Source like this: =Max([ReviewDate]) Let's say you name this textbox LastReview.
Ok, now put a textbox on the main form, set its Format property to whatever valid date format you prefer, and enter its Control Source like this: =DateAdd("yyyy",1,[NameOfYourSubform]![LastReview])
-- Steve Schapel, Microsoft Access MVP
Secret Squirrel wrote:
| Quote: | I have a subform that lists employee review information. It is linked to my main form by the employeeID. The subform is a continuous form and shows all the past reviews for that employee. I want to be able to put on my main for the next date that employee's review is due. But I need to add 1 year to the last review date from the subform. How can I pull the most current review date from the subform and add a year to it? |
|
| |
| | | Secret Squirrel |  |
| Posted: Sun Sep 14, 2008 3:28 am Post subject: Re: Choosing date from query |  |
| |  | |
Perfect! Thanks Steve!
"Steve Schapel" wrote:
| Quote: | Squirrel,
In the header or footer of the subform, put a hidden textbox, set its Format property to Short Date, and enter its Control Source like this: =Max([ReviewDate]) Let's say you name this textbox LastReview.
Ok, now put a textbox on the main form, set its Format property to whatever valid date format you prefer, and enter its Control Source like this: =DateAdd("yyyy",1,[NameOfYourSubform]![LastReview])
-- Steve Schapel, Microsoft Access MVP
Secret Squirrel wrote: I have a subform that lists employee review information. It is linked to my main form by the employeeID. The subform is a continuous form and shows all the past reviews for that employee. I want to be able to put on my main for the next date that employee's review is due. But I need to add 1 year to the last review date from the subform. How can I pull the most current review date from the subform and add a year to it?
|
|
| |
|
|