A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

What is the value of a blank field in a table?



 
 
Thread Tools Display Modes
  #1  
Old March 10th, 2005, 03:31 PM
William
external usenet poster
 
Posts: n/a
Default What is the value of a blank field in a table?

In my program I have a field that sums up a couple date/time fileds. If one
of the time fields dont have a value in there when i try to sum it in my
query it will give me an error.(#ERROR). How can i get around this problem?
  #2  
Old March 10th, 2005, 03:49 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

If a field has no entry, its value is Null.
You should be able to sum a field that contains Nulls, e.g.:
=DSum("MyField", "MyTable")

If you try to add fields horizontally across a record, then you must use
Nz() to substitute zero for null, e.g.:
=Nz([Field1], 0) + Nz([Field2], 0) + ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"William" wrote in message
...
In my program I have a field that sums up a couple date/time fileds. If
one
of the time fields dont have a value in there when i try to sum it in my
query it will give me an error.(#ERROR). How can i get around this
problem?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Design help, please SillySally Using Forms 27 March 6th, 2005 04:11 AM
Update Tables using forms achett Using Forms 5 January 28th, 2005 12:25 AM
Access & OleDb - generating schema changes, problem with identity/counter fields. Thomas Tomiczek [MVP] Database Design 9 November 5th, 2004 10:32 AM
Table Wizard Does Not Set Relationship if Foreign Key and Primary Key Name Do Not Match Exactly in Case. HDW Database Design 3 October 16th, 2004 03:42 AM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM


All times are GMT +1. The time now is 12:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.