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 4 1646
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.
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
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.
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim Fox |
last post by:
I have a report that I created that has no data, just boxes, lines and one
date field not tied to anything. Basically this report will just print
pages according to the dates you entered. Then...
|
by: Nathan Bloomfield |
last post by:
Does anyone know if there is any documentation which relates to Access2k + ?
or can anyone help adjust the code?
I am having trouble converting the DAO references.
TITLE :INF: How to...
|
by: Mike MacSween |
last post by:
tblCourses one to many to tblEvents.
A course may have an intro workshop (a type of event), a mid course
workshop, a final exam. Or any combination. Or something different in the
future.
At...
|
by: salad |
last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My
beautiful report(s) in Access were going to require loss of formatting
with RTFs, a PITA in WordMailMerge, sending it as a text...
|
by: RMC |
last post by:
Hello,
I'm looking for a way to parse/format a memo field within a report.
The Access 2000 database (application) has an equipment table that
holds a memo field. Within the report, the memo...
|
by: Bill |
last post by:
I've searched comp.databases.ms-access for a solution and found help
but still haven't got my problem solved. I want to record weekly
attendance and print an attendance "check off" sheet where...
|
by: creative1 |
last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
|
by: Ron |
last post by:
Hi All,
I've got a client/transaction type of database where tblClient is linked to
tblTransactions via ClientID. The client table contains all clients from
day one. The transaction table...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |