473,383 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Calculating 2 fields in subform

I'm trying to calculate 2 seperate fields in a subform

First one is TotalQuantity
I have =Sum([Quantity]) in the subform footer
I then show this total on the main form with =Windows.Form!TotalQuantity
The above works no problem

The Second one I calculate is TotalPrice
I have =nz(Sum(ExtPrice)) in the subform footer
I then show this total on the mian form with =Windows.Form!TotalPrice

This doesn't work, I get an error on the main form.

What also baffles me is once I add the calculations for the second field, the first one also gives me an error and no longer works. I've searched various resources for over an hour and can't figure it out. HELP me plpease =)
Feb 20 '08 #1
6 1898
On the help page below, it appears that the syntax in your code may be incorrect for the Nz function. You shouldn't have a null value for an extended price. If the item has no cost, I would use 0.00 in that field and just use =sum([ExtPrice]).

http://msdn2.microsoft.com/en-us/library/aa172237.aspx
Feb 20 '08 #2
I have tried that also. That doesn't work either. I am completely at a loss as to why this isn't working.
Feb 20 '08 #3
Can you send me a copy of the database? << e-mail removed >>

I have tried that also. That doesn't work either. I am completely at a loss as to why this isn't working.
Feb 21 '08 #4
NeoPa
32,556 Expert Mod 16PB
Sherry,

Please feel free to swap contact details via the PM system, but that is not allowed in the public forums. Sorry.
See the Help (Link at top right) section for fuller details.

-Admin.
Feb 21 '08 #5
I woke up this morning with a fresh mind and figured it out.
Instead of having it sum the extprice, I had it calculate the sum of Price x quantity and it worked for some reason.
Feb 22 '08 #6
NeoPa
32,556 Expert Mod 16PB
That's good. Thanks for updating the thread :)
Feb 22 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: keith | last post by:
This may seem simple, but I'm having a bit of trouble figuring out exactly how to do it. I'm accessing a database through an ODBC link, and I have a query that returns only jobs completed that day...
1
by: jdph40 | last post by:
On my form I have a tab control that contains 12 subforms. The child/master field that links the main form to each subform is IncidentNo. Each subform is used to record a corrective action that...
2
by: John | last post by:
I have two tables in a 1:M relationship- the parent has 5 fields in the primary key and the child 6 (these are actually pretty far downstream in a complicated ER model, but the problem is between...
3
by: JDiamond | last post by:
Hi, I have a table called Hosts. The Hosts table contains the following fields: Each field represents a step in the project. The tech that completes each step initials the respective...
2
by: Tim Marshall | last post by:
Wondering if anyone has any suggestions for this. Sometimes in the form reports my users run, a data sheet subform on a main form, with totals in text boxes with calculated controlsources...
1
by: dakboyan | last post by:
Hiya guys, I have a problem here that ive can't seem to solve on my own or through searching around the forums here. I would be glad if someone could assist me. This is actually an events...
11
imrosie
by: imrosie | last post by:
Hello Experts This is a hard one (I still speak newbie). An expert may think it's not a big deal, but, I am trying to replace my Main Order form with a subform because of the following: ...
6
by: jonnyboy | last post by:
Hello, I have an Access application with a number of forms. On opening one particular form, the application will sometimes appear to get stuck in a loop with 'Calculating...' in the status bar for...
4
by: sumit kale | last post by:
Hi, Can somebody help me resolve my problem ? I am getting error when calculating total using unbound textfiled in subform. I have a main form called purchase_register_master and a subform...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.