calculated fields in a report

P

pigsy101

i have a database which measures the level of toner cartridges we have
in stock.

A report shows the printer, cartridge, opening stock, ordered,
allocated, total in stock, reorder level and a calculated field to
give =[Total In Stock]-[reorderlevel].

This all works fine.

I want to display a check box that is true if the number calculated
field result is 1 or less and false if it is 2 or more. I want the
source of the check box to be the calculated field

The calculated field name is [balance] and the check box is [re-
order?]

I know this can be done with code but i can't work it out.

thanks in advance
 
P

pigsy101

Another approach might be to do the calculation and the checkbox
determination in a query, then use that query as the source for your report.

--
Regards

Jeff Boycewww.InformationFutures.net

Microsoft Office/Access MVPhttp://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentorhttp://microsoftitacademy.com/




i have a database which measures the level of toner cartridges we have
in stock.
A report shows the printer, cartridge, opening stock, ordered,
allocated, total in stock, reorder level and a calculated field to
give =[Total In Stock]-[reorderlevel].
This all works fine.
I want to display a check box that is true if the number calculated
field result is 1 or less and false if it is 2 or more. I want the
source of the check box to be the calculated field
The calculated field name is [balance] and the check box is [re-
order?]
I know this can be done with code but i can't work it out.
thanks in advance- Hide quoted text -

- Show quoted text -

Hi Jeff

I tried this and i got true for any result other than 0.

How can i get a result of 1 or less to show true and 2 or more to show
false.

eg
re-order level = 1 amount in stock = 2 therefore result would be
false.
re-order level = 1 amount in stock = 1 therefore result would be true.

Thanks

Paul
 
L

Larry Linson

pigsy101 said:
re-order level = 1 amount in stock = 2 therefore
result would be false.
re-order level = 1 amount in stock = 1 therefore
result would be true.

In the Query Builder grid, you would calculate Field Result as:

Result: [Amount in Stock] =< [Re-Order Level]

That should do what you want.
 

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

Top