By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

MS ACCESS, iif checkbox then calc.

P: 1
So basically I've made a database in MS Access.. Quite huge one.
I may sound like a total newbie, but thats somewhat what I am.

Then I made a 40 fields query from 3 databases, 2 of the databases got predefined entries/records, but the last one doesn't and its that form I want to make.

The last databases contains 6 checkboxes which are defined with datatype "YES/NO" when I made the databases. So what I need now is an iif command that gives me an ouput if for example checkboxA and checkboxB is checked/true.

Example.
Lets say checkboxA is checked & checkboxC is checked, then I want it to calculate a predined value for A, which is 50 and a predfined value for B, which is 100, and then finally I want it to calculate (field) [miles]*0,45USD and add all in the ouput field.

I hope this was explaining enough, if not, let me know and I will update the thread.

On beforehand, thanks for all answers.
Dec 1 '06 #1
Share this Question
Share on Google+
1 Reply


NeoPa
Expert Mod 15k+
P: 31,656
Let us assume that CheckboxA is worth 50; CheckboxB is worth 100; CheckboxC is worth 200; The output field is called txtResult.
The format of txtResult would be set to "Currency"
The RecordSource of txtResult would be set to :
Expand|Select|Wrap|Line Numbers
  1. (IIf(CheckboxA,50,0)+IIf(CheckboxB,100,0)+IIf(CheckboxC,200,0))*0,45
Dec 1 '06 #2

Post your reply

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