A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Fomula in a Text Box



 
 
Thread Tools Display Modes
  #1  
Old May 28th, 2004, 05:46 AM
PJ
external usenet poster
 
Posts: n/a
Default Fomula in a Text Box

I have form for employees, on this form there is an is a field in which the date of the employees induction is stored.

I created a text box and added the formula below to highlight if the employee needed a review induction. ie if the employee had been there for more than 1 year, then a review needs to be done. I want this to display on the form because it will only be looked at if a casual employee is going permanent BUT if I put the "greater than" sign one way they all come up the same and if I reverse it they all come up the other remark. Waht have I done wrong....

=iif([Induction Date](now()-365),"A review induction must be completed","A review induction is not necessary")

All help much appreciated.

Thanks


  #2  
Old May 28th, 2004, 06:07 AM
Graham R Seach
external usenet poster
 
Posts: n/a
Default Fomula in a Text Box

PJ,

Simply:
="A review induction " & IIf(DateAdd("yyyy", 1, [Induction Date]) Date(),
"must be completed.", "is not necessary.")

However, there appears to be no way to include employees who were inducted
more than a year ago, but have not had their induction review yet. I suggest
adding a field to indicate the date an induction review was conducted. Then
you could include that in your formula.

="A review induction " & IIf(DateAdd("yyyy", 1, [Induction Date]) = Date(),
"must be completed.", IIf([Review Date] Is Null, "is overdue.", "is not
necessary."))

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyT...764559036.html


"PJ" wrote in message
...
I have form for employees, on this form there is an is a field in which

the date of the employees induction is stored.

I created a text box and added the formula below to highlight if the

employee needed a review induction. ie if the employee had been there for
more than 1 year, then a review needs to be done. I want this to display on
the form because it will only be looked at if a casual employee is going
permanent BUT if I put the "greater than" sign one way they all come up the
same and if I reverse it they all come up the other remark. Waht have I done
wrong....

=iif([Induction Date](now()-365),"A review induction must be

completed","A review induction is not necessary")

All help much appreciated.

Thanks




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.