I have a statement that says
if [field]=null then [field]=0
to change the field from a possible null to a 0
the field is a type currency and when it runs it will not change it to a 0
I have calculations that needs to work off the value of the field and they
will not work since it is a null. I could change the info later but it is in
a query and do not know how to do that later change.
--
Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200507/1 10 4102
"Mark Carlyle via AccessMonster.com" <fo***@AccessMonster.com> wrote in
news:51***********@AccessMonster.com: I have a statement that says
if [field]=null then [field]=0
to change the field from a possible null to a 0
the field is a type currency and when it runs it will not change it to a 0
I have calculations that needs to work off the value of the field and they will not work since it is a null. I could change the info later but it is in a query and do not know how to do that later change.
No field is a Null. Null means unknown, not given. It is not a value.
Null is not equal to Null. Nothing is equal to Null. Generally we test for
Null with the assertion Is Null.
We should not use zero for null. Zero is not Null. Mathemtical calculations
which use zero for Null are often flawed.
GUIs which accept default Null in place of default zero lack rigor.
***
But
In your calculations you could use:
Nz(Field, 0)
You could look up Nz in Access/VBA help to learn about it.
"Mark Carlyle via AccessMonster.com" <fo***@AccessMonster.com> wrote in
news:51***********@AccessMonster.com: I have a statement that says
if [field]=null then [field]=0
to change the field from a possible null to a 0
the field is a type currency and when it runs it will not change it to a 0
I have calculations that needs to work off the value of the field and they will not work since it is a null. I could change the info later but it is in a query and do not know how to do that later change.
No field is a Null. Null means unknown, not given. It is not a value.
Null is not equal to Null. Nothing is equal to Null. Generally we test for
Null with the assertion Is Null.
We should not use zero for null. Zero is not Null. Mathemtical calculations
which use zero for Null are often flawed.
GUIs which accept default Null in place of default zero lack rigor.
***
But
In your calculations you could use:
Nz(Field, 0)
You could look up Nz in Access/VBA help to learn about it.
On Fri, 15 Jul 2005 17:34:25 GMT, "Mark Carlyle via AccessMonster.com"
<fo***@AccessMonster.com> wrote: I have a statement that says
if [field]=null then [field]=0
to change the field from a possible null to a 0
the field is a type currency and when it runs it will not change it to a 0
I have calculations that needs to work off the value of the field and they will not work since it is a null. I could change the info later but it is in a query and do not know how to do that later change.
-- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200507/1
Look up the function Nz in help. In particular Nz(x,0) is zero if x is
null and equals x otherwise (not sure about types in the latter case).
In spite of what Lyle recommends Access treats null as a value, with
the special properties that comparing it with anything gives the
answer false, and with the special function isnull() and (in SQL) IS
NULL.
Ideally null wouldn't exist (!) but it cannot be avoided in outer
joins, for example.
On Fri, 15 Jul 2005 17:34:25 GMT, "Mark Carlyle via AccessMonster.com"
<fo***@AccessMonster.com> wrote: I have a statement that says
if [field]=null then [field]=0
to change the field from a possible null to a 0
the field is a type currency and when it runs it will not change it to a 0
I have calculations that needs to work off the value of the field and they will not work since it is a null. I could change the info later but it is in a query and do not know how to do that later change.
-- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...ccess/200507/1
Look up the function Nz in help. In particular Nz(x,0) is zero if x is
null and equals x otherwise (not sure about types in the latter case).
In spite of what Lyle recommends Access treats null as a value, with
the special properties that comparing it with anything gives the
answer false, and with the special function isnull() and (in SQL) IS
NULL.
Ideally null wouldn't exist (!) but it cannot be avoided in outer
joins, for example.
rude person wrote: In spite of what Lyle recommends Access treats null as a value, with the special properties that comparing it with anything gives the answer false
Actually it gives the answer null, not false. It may look false because
it fails any condition by not being true, e.g.
if a = null then
' this bit will never execute
endif
if a <> null then
' neither will this
endif
Ideally null wouldn't exist (!) but it cannot be avoided in outer joins, for example.
It doesn't exist as such, but must exist in order to at least satisfy
Codd's 3rd rule
--
[OO=00=OO]
rude person wrote: In spite of what Lyle recommends Access treats null as a value, with the special properties that comparing it with anything gives the answer false
Actually it gives the answer null, not false. It may look false because
it fails any condition by not being true, e.g.
if a = null then
' this bit will never execute
endif
if a <> null then
' neither will this
endif
Ideally null wouldn't exist (!) but it cannot be avoided in outer joins, for example.
It doesn't exist as such, but must exist in order to at least satisfy
Codd's 3rd rule
--
[OO=00=OO]
In Access 2003 (tested only on my laptop) operations with nulls
generate run-time errors. Yay! Who said there was nothing new or better
in Access 2003?
In Access 2003 (tested only on my laptop) operations with nulls
generate run-time errors. Yay! Who said there was nothing new or better
in Access 2003?
On Sat, 16 Jul 2005 15:01:39 +0100, Trevor Best <no****@besty.org.uk>
wrote: rude person wrote:
In spite of what Lyle recommends Access treats null as a value, with the special properties that comparing it with anything gives the answer false
Actually it gives the answer null, not false. It may look false because it fails any condition by not being true, e.g.
if a = null then ' this bit will never execute endif
if a <> null then ' neither will this endif
True. Or perhaps I should say "Correct"
By treating null like a value I meant that you can assign it and set
it as a default value. In fact you can even include it in a select
list (in JET and Oracle for example). These are cases where you have
something in your hand and decide to set its value to null, rather
than null occuring "naturally" as it were. Ideally null wouldn't exist (!) but it cannot be avoided in outer joins, for example.
It doesn't exist as such, but must exist in order to at least satisfy Codd's 3rd rule
On Sat, 16 Jul 2005 15:01:39 +0100, Trevor Best <no****@besty.org.uk>
wrote: rude person wrote:
In spite of what Lyle recommends Access treats null as a value, with the special properties that comparing it with anything gives the answer false
Actually it gives the answer null, not false. It may look false because it fails any condition by not being true, e.g.
if a = null then ' this bit will never execute endif
if a <> null then ' neither will this endif
True. Or perhaps I should say "Correct"
By treating null like a value I meant that you can assign it and set
it as a default value. In fact you can even include it in a select
list (in JET and Oracle for example). These are cases where you have
something in your hand and decide to set its value to null, rather
than null occuring "naturally" as it were. Ideally null wouldn't exist (!) but it cannot be avoided in outer joins, for example.
It doesn't exist as such, but must exist in order to at least satisfy Codd's 3rd rule This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brandon McCombs |
last post by:
hello,
I have an app that pops up a custom dialog box and one of the fields for
user input is an account balance field. The data gets put into an
Object and eventually into an instance of...
|
by: Tim Roberts |
last post by:
It looks to me like the handling of the currency type in an ADODB
connecction from Python is broken. Currency data in an Access database is
stored as a 64-bit integer, scaled by 10000. In an...
|
by: techy techno |
last post by:
hii Experts..!!
I need someone to tell me where I can get a Currency Converter like
http://cconv.textor.com
please can someone tell me where I can get it
I need it for free + I dont need...
|
by: Dalan |
last post by:
This should not be an issue, but it is. I'm sure that someone knows
what little piece of code is needed too persuade Access 97 to include
a currency format for labels (Avery, mailing type). Have...
|
by: Baybars |
last post by:
New to access, but to deja.com. Looked through many posts, but can not
find a good post for my problem (I believe there is, but my access
level didn't allow me to understand).
I have a table for...
| |
by: Adrian |
last post by:
Hi
I want to use the following declarations but vb dotnet keeps complaining
that currency can't be used because it private ?
I have tried it in a module and in the declaration pare same error!...
|
by: sck10 |
last post by:
Hello,
I have a SQL Server 2K table with a field set to currency. When I try to
insert or update a FormView, I get the following error:
Disallowed implicit conversion from data type nvarchar...
|
by: Scott M. |
last post by:
Ok, this is driving me nuts...
I am using VS.NET 2003 and trying to take an item out of a row in a
loosely-typed dataset and place it in a label as a currency. As it is now,
I am getting my...
|
by: sam |
last post by:
Hello,
I have to make some development in VB.NET for managing money data.
I used tu made these kind of development with currency type when I worked in
VB6 but here in VB.NET, I can't find this...
|
by: =?Utf-8?B?SGlwSG9wcGVy?= |
last post by:
Hi,
What's the Minimum and Maximum value for RangeValidator currency type?
For example form -99,999,999,999,999 to 99,999,999,999,999?
--
HipHopper
|
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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |