I have a query with the following fields cost, AccDpr, Disposal and NBV, what i want to do is to returned NBV to zero when their is any value i.e amount in disposal field. The NBV formula = [cost]-[Accdpr]. Pls Help
I see. Thank you.
Just change the Formula to: - = IIf([Disposal] Is Not Null, 0, [cost]-[Accdpr])
Hope this hepps!
10 1520
Mafi,
My first advice to you is that you should never have a calculated field as part of a table. The MBV value should always be calculated in the query or report that uses the other three values. This eliminates your current concerns, and the MBV value will always be current and accurate.
Hope this hepps!
All my calculated fields are in query not part of table.
NeoPa 32,556
Expert Mod 16PB
Is this as simple as saying : - IIf([Disposal]=0,0,[Cost]-[AccDpr]) AS [NBV]
I see. Thank you.
Just change the Formula to: - = IIf([Disposal] Is Not Null, 0, [cost]-[Accdpr])
Hope this hepps!
And NeoPa and I think alike!
Twinnyfo u get it right but i did a little modification to work perfectly for me. = IIf([Disposal] Is Null, 0, [cost]-[Accdpr]). Thanks.
But I thought that if there was a value in Disposal, that NBV was set to 0? Your formula says the opposite, that if Disposal is empty, NBV is 0.
Neopa thank you also for ur contribution.
NeoPa 32,556
Expert Mod 16PB
Interesting. So, when you say "When [Disposal] has no value" you actually mean when there is no value set, rather than when the value is zero (0). That's a hard concept to express clearly so it's understandable you left us confused. Mafi:
what i want to do is to returned NBV to zero when their is any value i.e amount in disposal field.
If your adjusted code is what you want then your original question was back-to-front. As such, Twinny's answer was perfect and I'll set it as Best Answer. That doesn't mean you have to use it directly, but anyone else looking for a solution to a similar question will find his answer most helpful.
NeoPa 32,556
Expert Mod 16PB Mafi:
Neopa thank you also for ur contribution.
My pleasure. If I'd understood you better I'd have given you the same solution Twinny did, but they were both close enough to work from. Glad you're sorted :-)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Generic Usenet Account |
last post by:
As per Google's Usenet archives
http://groups.google.com/googlegroups/archive_announce_20.html], the
first discussion of the Y2K problem on the Usenet was on January 18
1985...
|
by: Zhiqiang Ye |
last post by:
Hi, All
I am reading FAQ of this group. I have a question about this:
http://www.eskimo.com/~scs/C-faq/q7.31.html
It says:
"
p = malloc(m * n);
memset(p, 0, m * n);
The zero fill is...
|
by: RS |
last post by:
Hi,
Looking to see if the following construct is valid:
typedef struct {
int foo;
char bar;
} foobar;
Basically, the idea is to have the structure above point to a message
buffer that has...
|
by: Chris |
last post by:
I am just wondering if I did this the best way possible. I needed to
add a double boarder around a label box. So I made a pen in the class,
and do the drawing of the rectangles in the onpaint...
|
by: Zytan |
last post by:
I want to make a zero element array. I know that Nothing is not the
same as a zero element array, since I can't get the length of, or
iterate through, an array = Nothing. I could make a zero...
|
by: horacius.rex |
last post by:
Hi,
I have a code that in some part of the program calculates 1/x for a
lot of different x's. About 1 of 100 times x is equal to zero, so when
I print the result I obtain inf. I wonder if there...
|
by: Ravikiran |
last post by:
Hi Friends,
I wanted know about whatt is ment by zero optimization and
sign optimization and its differences....
Thank you...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: 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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
| |