473,387 Members | 1,864 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,387 software developers and data experts.

check box to determine whether sales tax applied

I have a form that has field called "Charge",an unbound check box called "Check127", and a field called "Tax Amount". If the check box is checked I want the field "Charge" to be multiplied by .06 and the result to be in the field "Tax Amount". If the box is not checked I want "0" to be in the "Tax Amount" field.
Sep 25 '18 #1

✓ answered by twinnyfo

Hughesb6,

Welcome to Bytes!

You would set the ControlSource for the "Tax Amount" Text box to:

Expand|Select|Wrap|Line Numbers
  1. =IIf([Check127], [Charge] * 0.06, 0)
Hope that hepps!

7 960
twinnyfo
3,653 Expert Mod 2GB
Hughesb6,

Welcome to Bytes!

You would set the ControlSource for the "Tax Amount" Text box to:

Expand|Select|Wrap|Line Numbers
  1. =IIf([Check127], [Charge] * 0.06, 0)
Hope that hepps!
Sep 25 '18 #2
That didn't work, I still get the error.
Sep 26 '18 #3
PhilOfWalton
1,430 Expert 1GB
I think Twinnyfo meant the ControlSource, not the RecordSource.

What he has posted is perfectly correct, but I think
Expand|Select|Wrap|Line Numbers
  1. =IIf([Check127] = True, [Charge] * 0.06, 0)
is clearer to understand.

Phil
Sep 26 '18 #4
twinnyfo
3,653 Expert Mod 2GB
Yes - thanks for the catch, Phil. ControlSource--not RecordSource.
Sep 26 '18 #5
That worked, I had a misspell. Thank you both for your help!!
Sep 26 '18 #6
twinnyfo
3,653 Expert Mod 2GB
Glad we could hepp! Phil caught my glitch, though!
Sep 26 '18 #7
NeoPa
32,556 Expert Mod 16PB
HughesB6:
That didn't work, I still get the error.
What error? You mentioned no error.

When asking for help it's better that, when you have an error then please state the problem as clearly as you can. If there is an error showing then, obviously, include the full text of that error.

In this case it's clear that we've passed that stage, but I'm hoping you'll continue to benefit from Bytes.com with new questions.

As far as comparing boolean values to True or False is concerned, this topic's been covered in detail before. It's not a good idea as it encourages developers to think like non-developers (Not a flattering comparison). Furthermore, it can lead to very hard to figure out logic errors, as not everything that can be used as a boolean necessarily has acceptable boolean values. So, if you absolutely must compare to one or other, then always compare to False. That way you'll never actually introduce any logic inaccuracies.
Sep 26 '18 #8

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

Similar topics

2
by: OvErboRed | last post by:
Hi, I'm trying to determine whether a given URL exists. I'm new to Python but I think that urllib is the tool for the job. However, if I give it a non-existent file, it simply returns the 404 page....
16
by: Donjuan | last post by:
Hi all I have trouble with tracking whether my image file is loaded. i use DHTML to change my image. HERE is the code: <img name="someimage" src="1.jpg"...
1
by: Ashabul Yeameen | last post by:
I am writing a program which at some point need to call fputwc() function. But since I want to make this code portable I've decided to write my own fputwc() funcion where the compiler doesn't...
2
by: Shravan | last post by:
Hi, In my application I need to determine whether Excel is installed on my system or not. Can anybody tell me how to check that. Thanks, Shravan.
0
by: hoenes1 | last post by:
How can I determine whether a download has been cancelled by the client? I'm sending the file from an aspx page in chunks of 4K. When the user presses "Cancel" in his download dialog, the next call...
0
by: Roz Lee | last post by:
I need to determine whether the client browser has disabled the Active Scripting option in their browser security settings as they will be unable to log in to my asp.net site if they have, in which...
2
by: ljlevend | last post by:
Is there a way to determine whether font supports ClearType? Thanks, Lance
1
by: topramen | last post by:
does any one here know of a good way to to determine whether or not a given path is a directory (e.g., "c:\mydir") or a file (e.g., "c:\mydir \myfile.txt")? i started attacking this problem by...
9
by: Mark Berry | last post by:
Hi, How can I determine whether an object is derived from another object? My specific example is that I have a CustomError class with several specific error types that derive from it...
3
by: abhimanyu | last post by:
I have a method Marshal.IsComObject(...) that returns TRUE if an object is a COM object. I have an object of Excel.Worksheet that I released using Marshal.ReleaseComObject(...). I want to iterate...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.