473,508 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update Table from form or query

Hi Again;

I am improving my database and have to overcome some original design
mistakes. I have 3500 records in the table and I have had to insert new
fields to track things I originally didn't forsee.
The new fields in the table now show nulls where there is no data. When I
run a query based on the table and including the field that contains about
1000 records with appropriate numeric data in the field, I can't get the
query to calculate a field that contains a null value.(Around 2500 records
contain null vaqlues in 6 different fields) The amount of work required to
go in and physicaly enter a 0 value is just too much.
Is there a way to force the query to insert zeros in the table where nulls
occur and perform the calculations I need (The fields needed to perform the
calculation contain nulls presently)
TIA
Nov 13 '05 #1
2 1857
Use the following expression in your calculation:
NZ([YourField],0)
In thise expression, Access will use the value in "YourField" if it is not
Null or use 0 if it is Null.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"jquest" <ad******@telus.net> wrote in message
news:n9SId.18912$Qb.1462@edtnps89...
Hi Again;

I am improving my database and have to overcome some original design
mistakes. I have 3500 records in the table and I have had to insert new
fields to track things I originally didn't forsee.
The new fields in the table now show nulls where there is no data. When I
run a query based on the table and including the field that contains about
1000 records with appropriate numeric data in the field, I can't get the
query to calculate a field that contains a null value.(Around 2500 records
contain null vaqlues in 6 different fields) The amount of work required to
go in and physicaly enter a 0 value is just too much.
Is there a way to force the query to insert zeros in the table where nulls
occur and perform the calculations I need (The fields needed to perform the calculation contain nulls presently)
TIA

Nov 13 '05 #2
Thank You. I couldn't make a chart from the table, and without calculating a
query with Nulls present, I couldn't do it with a Query either. It works
now.

Thank You

"PC Datasheet" <no****@nospam.spam> wrote in message
news:UR*****************@newsread1.news.pas.earthl ink.net...
Use the following expression in your calculation:
NZ([YourField],0)
In thise expression, Access will use the value in "YourField" if it is not
Null or use 0 if it is Null.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"jquest" <ad******@telus.net> wrote in message
news:n9SId.18912$Qb.1462@edtnps89...
Hi Again;

I am improving my database and have to overcome some original design
mistakes. I have 3500 records in the table and I have had to insert new
fields to track things I originally didn't forsee.
The new fields in the table now show nulls where there is no data. When I run a query based on the table and including the field that contains about 1000 records with appropriate numeric data in the field, I can't get the
query to calculate a field that contains a null value.(Around 2500 records contain null vaqlues in 6 different fields) The amount of work required to go in and physicaly enter a 0 value is just too much.
Is there a way to force the query to insert zeros in the table where nulls occur and perform the calculations I need (The fields needed to perform

the
calculation contain nulls presently)
TIA


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
4971
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by...
1
5158
by: Kunal | last post by:
Hi, I need some help on writing an update query to update "UnitsSold" field in Products Table whenever I save a transaction. The transaction may contain several "Subtransactions", one for each...
9
4333
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
4
3382
by: John Baker | last post by:
Hi: I have two tables, a setup table (TblSetup) and a purchase order table (tblPO). When i construct a query with ONLY the tblPO shown, and a type in parameter for the PO number, I an update...
5
2187
by: cover | last post by:
I have an input form that passes data when submitted to a second form to let the user know what they have just entered into the db. My question comes with using 'update'. I'd like to query the...
16
3460
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
3
2660
by: eholz1 | last post by:
Hello PHP programmers. I had a brilliant idea on one of my pages that selects some data from my mysql database. I first set the page up to display some info and an image, just one item, with a...
5
2467
by: keeps21 | last post by:
A little problem I've run into is the following. I have a script that allows a user to edit a story. I have an HTML form for title and main_text which gets it's values by pulling the selected...
16
3462
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
11
4262
by: stantron | last post by:
Setup: I only have one database with one table in it. The first page has a form that adds a record (w/ 6 fields in it) to the mySQL database's lone table via PHP. This works fine. I also have a PHP...
1
7042
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...
0
7495
tracyyun
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...
0
5627
agi2029
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,...
1
5052
isladogs
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...
0
4707
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...
0
3193
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...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.