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

Conditional Expression with CheckBoxes in Access

1
I have a problem which may be simple to solve...not sure (teaching myself Access using Access 2002).

I have a field [total] that performs the calculation =[qty]*[price]
however, sometimes the item is not taxable. I want to add a CheckBox to show whether the item is taxable or not. When the CheckBox is checked it means that the item is not taxable and I want the [total] value to appear in another field [nontax]. If the CheckBox goes unchecked then the calculation is performed and the value stays in the [total] field.

Can this be done using a checkbox? or is there anyway way I should go about it.

Any help you can lend would be great.
Jan 24 '08 #1
1 2306
MindBender77
234 100+
I have a problem which may be simple to solve...not sure (teaching myself Access using Access 2002).

I have a field [total] that performs the calculation =[qty]*[price]
however, sometimes the item is not taxable. I want to add a CheckBox to show whether the item is taxable or not. When the CheckBox is checked it means that the item is not taxable and I want the [total] value to appear in another field [nontax]. If the CheckBox goes unchecked then the calculation is performed and the value stays in the [total] field.

Can this be done using a checkbox? or is there anyway way I should go about it.

Any help you can lend would be great.
You could use an IF statement. Something like:
Expand|Select|Wrap|Line Numbers
  1. if textbox1 =  x then 
  2. CheckBox1.value = true
  3. else
  4. CheckBox1.value = false
  5. end if
  6.  
You could indicate whether an item is taxable by say, a label that will be invisible until the item is not taxable and then it becomes visible.

Hope this leads you in the right direction,
JS
Jan 24 '08 #2

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

Similar topics

8
by: neblackcat | last post by:
Would anyone like to comment on the following idea? I was just going to offer it as a new PEP until it was suggested that I post it here for comment & consideration against PEP 308. I'm far...
2
by: John Kreps | last post by:
(acc 2002) I've got six unbound text boxes on a subform that has a white background. Each of those six boxes has an expression that when true, will change its background from white to another...
5
by: Andrew Chanter | last post by:
Does anyone know a way you can use conditional formatting to create a banded style view as is commonly seen on the internet. (In othe words the first record appears on a gray background, the 2nd...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
6
by: Chris Dunaway | last post by:
Consider this code (.Net 2.0) which uses a nullable type: private void button1_Click(object sender, System.EventArgs e) { DateTime? nullableDate; nullableDate = (condition) ? null :...
5
by: jodyblau | last post by:
I am trying to do some conditional formatting with a textbox and I am not able to quite get it. Here is the setup: My record includes a textbox called and two checkboxes the first called ...
11
by: tg989 | last post by:
Okay, here goes. Continuous forms... possibly the best feature of access. The only downside is this: the only way to have a conditional evaluation run on each record invididually is by...
5
by: paulo | last post by:
Can anyone please tell me how the C language interprets the following code: #include <stdio.h> int main(void) { int a = 1; int b = 10; int x = 3;
3
by: aeon | last post by:
Working in Access 2007 on XP I have a combo box that I'm using in a form to select the WorkCategory assigned to a particular person in my database. WorkCategory is a lookup field in a table...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...

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.