Yes/ NO

E

Emma

Hi I have two check boxes I would like to be yes if expression true and no if
false. How do I do this, use the validation?
 
E

Emma

Hi Jeff,

I would like the expression to be Eligibility = Expenses => Revenue. From a
table and put back into the table under Yes true or No false then displayed
 
J

Jeff Boyce

Emma

A different (and more common) approach would be to not bother storing the
"calculated" value, since you already have the Expenses and Revenue values.

Instead, do the calculation in a query and use that query to "feed" the
form.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

Emma

When would I run the query? After Update?

Jeff Boyce said:
Emma

A different (and more common) approach would be to not bother storing the
"calculated" value, since you already have the Expenses and Revenue values.

Instead, do the calculation in a query and use that query to "feed" the
form.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

Emma

I tried putting the Expression in the query but it doesn't like it it divided
up into two parts: Expenses => Revenue and Revenue < Expenses when I try to
put the expression in Eligibility and it doesn't like it if I use an if.
 
J

Jeff Boyce

Emma

Create a new query. Add the fields you have. Do not use [Eligibility] as a
field if you have it in your table. Remove it.

Add a new field in the query, calling it "Eligible", looking something like:

Eligible: [Expenses] >= [Revenue]

Make that a True/False field (in the query).

Run the query.

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

BruceM

Emma, you need to provide a clearer and more detailed description of what
you have attempted. As I understand, Eligibility occurs if Expenses >=
Revenue. One approach is to create a query field. I will call it
CalculateEligibility. To create the field, open the query (based on the
table in question) in design view. At the top of a blank column, put
something like this:
CalcElig: [Revenue] >= [Expenses]

This will return -1 (True) if revenue >= expenses, otherwise it will return
0 (False). Use the query as the Record Source for a form. Use the new
field as the Control Source for a check box on the form.

Note that you do not need an Eligibility field in the table. Eligibility is
dependent on other fields, so rather than calculating the value and storing
the calculated result, just use the calculation to produce the desired value
as needed. In general, do not store calculation results, but rather
calculate on the fly as needed.
 
E

Emma

Thanks Bruce and Geoff it works like a charm however I still need to figure
out the second check box but I'll put that into another thread. Thanks again!

BruceM said:
Emma, you need to provide a clearer and more detailed description of what
you have attempted. As I understand, Eligibility occurs if Expenses >=
Revenue. One approach is to create a query field. I will call it
CalculateEligibility. To create the field, open the query (based on the
table in question) in design view. At the top of a blank column, put
something like this:
CalcElig: [Revenue] >= [Expenses]

This will return -1 (True) if revenue >= expenses, otherwise it will return
0 (False). Use the query as the Record Source for a form. Use the new
field as the Control Source for a check box on the form.

Note that you do not need an Eligibility field in the table. Eligibility is
dependent on other fields, so rather than calculating the value and storing
the calculated result, just use the calculation to produce the desired value
as needed. In general, do not store calculation results, but rather
calculate on the fly as needed.

Emma said:
I tried putting the Expression in the query but it doesn't like it it
divided
up into two parts: Expenses => Revenue and Revenue < Expenses when I try
to
put the expression in Eligibility and it doesn't like it if I use an if.
 
B

BruceM

What are the conditions resulting in that check box being checked or not?

Emma said:
Thanks Bruce and Geoff it works like a charm however I still need to
figure
out the second check box but I'll put that into another thread. Thanks
again!

BruceM said:
Emma, you need to provide a clearer and more detailed description of what
you have attempted. As I understand, Eligibility occurs if Expenses >=
Revenue. One approach is to create a query field. I will call it
CalculateEligibility. To create the field, open the query (based on the
table in question) in design view. At the top of a blank column, put
something like this:
CalcElig: [Revenue] >= [Expenses]

This will return -1 (True) if revenue >= expenses, otherwise it will
return
0 (False). Use the query as the Record Source for a form. Use the new
field as the Control Source for a check box on the form.

Note that you do not need an Eligibility field in the table. Eligibility
is
dependent on other fields, so rather than calculating the value and
storing
the calculated result, just use the calculation to produce the desired
value
as needed. In general, do not store calculation results, but rather
calculate on the fly as needed.

Emma said:
I tried putting the Expression in the query but it doesn't like it it
divided
up into two parts: Expenses => Revenue and Revenue < Expenses when I
try
to
put the expression in Eligibility and it doesn't like it if I use an
if.

:

When would I run the query? After Update?

:

Emma

A different (and more common) approach would be to not bother
storing
the
"calculated" value, since you already have the Expenses and Revenue
values.

Instead, do the calculation in a query and use that query to "feed"
the
form.

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hi Jeff,

I would like the expression to be Eligibility = Expenses =>
Revenue.
From
a
table and put back into the table under Yes true or No false then
displayed
on the form.

:

Emma

What expression?

In a form?

Both boxes checked if expression = True?

Validation? On the table?

More info, please!

Regards

Jeff Boyce
Microsoft Office/Access MVP


Hi I have two check boxes I would like to be yes if expression
true and
no
if
false. How do I do this, use the validation?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Yes/No 10
Error 13 - Type Mismatch 1
Yes/No export appearance 1
Yes/No field in a table-Make exclusive or default? 3
EXCEL - IF(IFERROR(VLOOKUP question 0
Check boxes 12
4 cells with yes, no list 1
Toggle checkboxes 4

Top