Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Access

Choosing date from query

 
Jump to:  
 
Secret Squirrel
PostPosted: 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
PostPosted: 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
PostPosted: 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?
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

zbior Free History Books limo kitesurfing wynajem warszawa