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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Null Value - in Total



 
 
Thread Tools Display Modes
  #1  
Old October 4th, 2004, 11:27 PM
SDDiamonds
external usenet poster
 
Posts: n/a
Default Null Value - in Total

I need to tell my orders form that the line total is = to
value B only if Value A is $0.00 (the default amount).
How do I do that?
  #2  
Old October 5th, 2004, 11:44 AM
Graham R Seach
external usenet poster
 
Posts: n/a
Default

The following returns value B if value A=0, otherwise it returns value A.
And if A is Null (undefined), value A is assigned the value of 0.

=IIf(Nz(A, 0)=0, B, Nz(A, 0))

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

"SDDiamonds" wrote in message
...
I need to tell my orders form that the line total is = to
value B only if Value A is $0.00 (the default amount).
How do I do that?



  #3  
Old October 5th, 2004, 11:29 PM
external usenet poster
 
Posts: n/a
Default

How do I define Value B in that expression? For Example:
A= My Diamond Line Total (Per Carat Price * Weight *
Quantity)
B= Jewelry Line Total - but I don't have it defined
anywhere. . .I have your formula in there - and it seems
to work - unless there is a jewelry item. . . .
How can I tell it that it need to calculate the Adjusted
jewelry price * quantity - discount etc. . .in the
formula you gave me??? I really appreciate the help!
-----Original Message-----
The following returns value B if value A=0, otherwise it

returns value A.
And if A is Null (undefined), value A is assigned the

value of 0.

=IIf(Nz(A, 0)=0, B, Nz(A, 0))

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

"SDDiamonds" wrote

in message
...
I need to tell my orders form that the line total is =

to
value B only if Value A is $0.00 (the default amount).
How do I do that?



.

  #4  
Old October 6th, 2004, 03:19 PM
Graham R Seach
external usenet poster
 
Posts: n/a
Default

How you define value B in this situation is up to you. It could be a
textbox, a variable (populated by a calculation), or a value entered in an
InputBox. If you don't want to specify a value for B, make it 0 (or
something else).

Either way, if you want to say B=C if A=D, you must also say what B should
be if AD.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

wrote in message
...
How do I define Value B in that expression? For Example:
A= My Diamond Line Total (Per Carat Price * Weight *
Quantity)
B= Jewelry Line Total - but I don't have it defined
anywhere. . .I have your formula in there - and it seems
to work - unless there is a jewelry item. . . .
How can I tell it that it need to calculate the Adjusted
jewelry price * quantity - discount etc. . .in the
formula you gave me??? I really appreciate the help!
-----Original Message-----
The following returns value B if value A=0, otherwise it

returns value A.
And if A is Null (undefined), value A is assigned the

value of 0.

=IIf(Nz(A, 0)=0, B, Nz(A, 0))

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

"SDDiamonds" wrote

in message
...
I need to tell my orders form that the line total is =

to
value B only if Value A is $0.00 (the default amount).
How do I do that?



.



 




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
RowSourceType Property(User-Defined Function)...Help Roddy General Discussion 1 September 3rd, 2004 02:00 PM
UNION Query with Criteria Dkline Running & Setting Up Queries 1 August 4th, 2004 09:15 PM
Need someone to look at SQL statement Dkline Running & Setting Up Queries 4 August 3rd, 2004 05:12 PM
"UNION" Query with different fields in the two tables Dkline Running & Setting Up Queries 5 July 30th, 2004 09:05 PM
Access inconsistencies Hoopie Running & Setting Up Queries 2 June 15th, 2004 10:53 AM


All times are GMT +1. The time now is 04:44 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.