macro for currency Ranges

R

Ron D

Does anyone have a macro for getting a value based on currency ranges
Example: if currecncy range is between $29000 to $100,000 = 100%
 
S

Steve Schapel

Ron,

This does not sound like a job for a macro. This sounds like a job for
a Query. I assume you are trying to get some values returned to a form
or report? Are you able to give some more specific details of what you
are trying to achieve here, along with some further data examples? Thanks.
 
R

Ron D

Thanks for your reply Steve, I have a form where data is entered by users,
and when a currency amount is entered I want another field to be populated
and stored in a bound field. I cant seem to figure out the language for the
program to use a currency range to populate the table. For instance If a
persons salary range is between 17,000 and 29,000 i want the field to
populate a value of "100%" if its under 17,000 I want the value to be "50%"
and if over 29,000 I want the field to display the word "None"
 
S

Steve Schapel

Ron,

What you are suggesting would normally be regarded as an invalid
procedure to perform in a database. This calculated value should not
normally be stored in a table. The general concept would be that the
value can easily be returned when needed for your purposes on form or
report, either via a calculated field in a query, or a calculated
control on the form or report. An example of the syntax you could use...
TheThing: IIf([Salary]<17000,"50%",IIf([Salary]<=29000,"100%","None"))
 

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