By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,806 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

report back future date

P: n/a
Dear Friends i am trying to get a future date as follows,

data:1) date of proceeding to leave = D
2) number of days leave sanctioned =N
3) date of reporting for duty =R
i grant "n" number of days leave to someone from"date of Leave" , so "R" the
reporting back date = "D"date of Leave + " 'N' no. of days leave granted",
this should happen afterupdate of the 'N ' column

thanks
rajnish

--
Message posted via http://www.accessmonster.com

Aug 21 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
drrajnishpatel via AccessMonster.com wrote:
Dear Friends i am trying to get a future date as follows,

data:1) date of proceeding to leave = D
2) number of days leave sanctioned =N
3) date of reporting for duty =R
i grant "n" number of days leave to someone from"date of Leave" , so "R" the
reporting back date = "D"date of Leave + " 'N' no. of days leave granted",
this should happen afterupdate of the 'N ' column

thanks
rajnish
I'll assume you are talking about a query for use in a form or report.
You can create a calculated column. We'll call it RBFD. Open up your
query in the query builder. Make sure DateProceedingToLeave and
NumberOfDays are columns in the query. (I use _ below for continuation
line and avoiding wordwrap in this response. Don't use the _ in the
query. Then enter in an empty column the following

RBFD : IIF(Not IsNull([DateProceedingToLeave]), _
DateAdd("d",NZ([NumberOfDays],0),[DateProceedingToLeave] , Null)

Change the field names above to reflect your field names.

You may want to review IIF, IsNull, DateAdd, and NZ in help.
Aug 21 '08 #2

P: n/a
thanks salad for you response.... but i am stll not very comfortable with
queries.... can i use it somehow on a form directly with by a vb code in
afterupdate event of "number of days leave sanctioned"

please guide

rajnish

Salad wrote:
>Dear Friends i am trying to get a future date as follows,
[quoted text clipped - 7 lines]
>thanks
rajnish

I'll assume you are talking about a query for use in a form or report.
You can create a calculated column. We'll call it RBFD. Open up your
query in the query builder. Make sure DateProceedingToLeave and
NumberOfDays are columns in the query. (I use _ below for continuation
line and avoiding wordwrap in this response. Don't use the _ in the
query. Then enter in an empty column the following

RBFD : IIF(Not IsNull([DateProceedingToLeave]), _
DateAdd("d",NZ([NumberOfDays],0),[DateProceedingToLeave] , Null)

Change the field names above to reflect your field names.

You may want to review IIF, IsNull, DateAdd, and NZ in help.
--
Message posted via http://www.accessmonster.com

Aug 22 '08 #3

P: n/a
drrajnishpatel via AccessMonster.com wrote:
thanks salad for you response.... but i am stll not very comfortable with
queries.... can i use it somehow on a form directly with by a vb code in
afterupdate event of "number of days leave sanctioned"
I suppose you could but what happens when you present another record on
the form? You need to recalc it.

I like them in the query because it presents the data faster to the
screen without redraws but if you want it as a calculated field
then...(change the fieldnames to reflect yours)
=IIF(Not IsNull([DateProceedingToLeave]),
DateAdd("d",NZ([NumberOfDays],0),[DateProceedingToLeave] , Null)

can be the controlsource of the calculated field.
>
please guide

rajnish

Salad wrote:
>>>Dear Friends i am trying to get a future date as follows,

[quoted text clipped - 7 lines]
>>>thanks
rajnish

I'll assume you are talking about a query for use in a form or report.
You can create a calculated column. We'll call it RBFD. Open up your
query in the query builder. Make sure DateProceedingToLeave and
NumberOfDays are columns in the query. (I use _ below for continuation
line and avoiding wordwrap in this response. Don't use the _ in the
query. Then enter in an empty column the following

RBFD : IIF(Not IsNull([DateProceedingToLeave]), _
DateAdd("d",NZ([NumberOfDays],0),[DateProceedingToLeave] , Null)

Change the field names above to reflect your field names.

You may want to review IIF, IsNull, DateAdd, and NZ in help.

Aug 22 '08 #4

P: n/a
thanks buddy... i will give it a try.....

thanks again

Salad wrote:
>thanks salad for you response.... but i am stll not very comfortable with
queries.... can i use it somehow on a form directly with by a vb code in
afterupdate event of "number of days leave sanctioned"

I suppose you could but what happens when you present another record on
the form? You need to recalc it.

I like them in the query because it presents the data faster to the
screen without redraws but if you want it as a calculated field
then...(change the fieldnames to reflect yours)
=IIF(Not IsNull([DateProceedingToLeave]),
DateAdd("d",NZ([NumberOfDays],0),[DateProceedingToLeave] , Null)

can be the controlsource of the calculated field.
>please guide
[quoted text clipped - 20 lines]
>>>
You may want to review IIF, IsNull, DateAdd, and NZ in help.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200808/1

Aug 23 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.