IIF> or < question

D

Dennis Villareal

i am running a query from a table.

i am then putting it in a report

one of the fields in the database needs to be >49999.

in the report can i add a text box somewhere that will display a warning if
this data is below 50000?

the problem is i could be showing 20 different items that need to be checked
on the report. i found out how it displays the first item on the report but
then i changed the second item on the report and the warning did not show up.

here is what i have

=IIf([YLD]<50000 Or [TEN]<62000 Or [ELG]<23,"LOOK AT SPECS!!!")

i run the report if the first item on the report shows a lower then the
folloing i get a error, but if the second shows less then i do not get the
error or 3 or 4 or 5 and so on.
 
J

Jack Cannon

Dennis,

I believe that your conditional statement needs to be part of the query and
then you can use the query field in your report.

Jack Cannon
 
D

Dennis Villareal

Thanks, Jack. that got me what i needed.

Jack Cannon said:
Dennis,

I believe that your conditional statement needs to be part of the query and
then you can use the query field in your report.

Jack Cannon

Dennis Villareal said:
i am running a query from a table.

i am then putting it in a report

one of the fields in the database needs to be >49999.

in the report can i add a text box somewhere that will display a warning if
this data is below 50000?

the problem is i could be showing 20 different items that need to be checked
on the report. i found out how it displays the first item on the report but
then i changed the second item on the report and the warning did not show up.

here is what i have

=IIf([YLD]<50000 Or [TEN]<62000 Or [ELG]<23,"LOOK AT SPECS!!!")

i run the report if the first item on the report shows a lower then the
folloing i get a error, but if the second shows less then i do not get the
error or 3 or 4 or 5 and so on.
 
J

John W. Vinson

i am running a query from a table.

i am then putting it in a report

one of the fields in the database needs to be >49999.

in the report can i add a text box somewhere that will display a warning if
this data is below 50000?

the problem is i could be showing 20 different items that need to be checked
on the report. i found out how it displays the first item on the report but
then i changed the second item on the report and the warning did not show up.

here is what i have

=IIf([YLD]<50000 Or [TEN]<62000 Or [ELG]<23,"LOOK AT SPECS!!!")

i run the report if the first item on the report shows a lower then the
folloing i get a error, but if the second shows less then i do not get the
error or 3 or 4 or 5 and so on.

I wouldn't use IIF() for this purpose. Instead, I'd suggest creating a Query
with criteria to isolate the records with a value out of spec. Base a Form on
this query, and open the form if there are any records; otherwise go ahead and
open the report.

Bear in mind that the data is in your Table. It's not in the report! It's best
not to launch the report at all, rather than to open the report and then back
out.
 

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


Top