I need an IIF function to Schedule an up coming date.
I have a DOR (date of review) column and a Outcome column which has drop down box function where I input trainee outcomes for their after their yearly reviews.
IF the outcome is less than 3 then the date needs to be schedule an mm/yyyy from the date of their review and if it is 3 or more then they need to come back 6 months from the date of their review - how would I do that?
Reply from Richard Rost:
You don't need an IIF function, just a little VB code. Use an AfterUpdate event for the combo box to set the value. It looks like your Outcome value is a NUMBER(?) from what you've said here. So you'd say something like this in your event:
If Outcome < 3 Then DateOfReview = DateAdd("m",1,Date()) ' add 1 month to current date Else DateOfReview = DateAdd("m",6,Date()) ' add 6 months to current date End If
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 207.
The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.