Re: Adding & Subtracting Numbers(Fields) with Expression Builder



Thanks Fred. That fixed it.
Stuart//
"fredg" <fgutkind@xxxxxxxxxxxxxxx> wrote in message
news:1ge282cex2p9a$.1ook65ch5gopx$.dlg@xxxxxxxxxxxxx
On Mon, 18 Dec 2006 23:20:18 GMT, Stuart wrote:

This has got to be simple but I don't see it. I have a simple query of a
table and I can see all the fields (defined as numbers in the table) in
the
database. I simply want to add and subtract the fields to get a computed
value in the query. Currently the calculated column is always turns out
blank. (e.g.Expr1:
Alphy!Level-Alphy!Upright-Alphy!Chest-Alphy!Storeroom-Alphy!Kitchen or
simply an order amount equal to a desired level minus all on hand amounts
in
the database) What is the exact syntax required for an computational
replacement in a query?

TIA, Stuart

Use the dot, not the bang.
Alphy.Level

It's likely one of the fields is null.
Some value + Null = Null.
Use the Nz() function. Look it up in VBA help.

Expr1:Nz([Level],0) - Nz([Upright],0) - Nz([Chest],0) -
Nz([Storeroom],0) - Nz([Kitchen],0)

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


.



Relevant Pages

  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)
  • Re: OT: SQL
    ... query processing. ... FROM Employees e, Employees m, Management mgt ... Manager and Employee Salaries. ... The scheme used does not model database files in general, ...
    (sci.logic)
  • Re: access 2003
    ... I removed the parameters from the form query source. ... boxes from the form header, events, code, etc and ran the form query source ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would be ...
    (microsoft.public.access.conversion)
  • RE: Import external data - web query
    ... Your reply for my query is very extensive, this is for importing a file from ... The data source I want isn't listed in the Select Data Source dialog box. ... information used to connect to a database. ... Check your driver First, make sure you have the right ODBC driver (Open ...
    (microsoft.public.excel.misc)
  • Re: access 2003
    ... I removed the parameters from the form query source. ... synchronize combo boxes to the detail section or the parameter form query ... forms queries and the SQL because syntax of the SQL will change randomly. ... the Access 97 database, I wouldn't have thought any expressions would ...
    (microsoft.public.access.conversion)