criteria to find percents

N

new and learining

i have a large amout of sales information that i have made in to a query
based report for a database im building. what im trying to do is have
everyting with a [Margin %] less than a % be pulled down to that report. the
trouble im having is i want the user to be able to define what % that is when
they open the report. (someone maybe looking for anything less than 35%,
where as another is looking for anything less than 45%)
i have tried <[Enter pct threshold] but that did not work. any other
suggestions. i am extreamly new at access any help would be great. thanks
 
K

KARL DEWEY

Need a little more information as to what the margin is on. Post information
on your table structure - field names, datatype, etc. sample data.
 
J

John Spencer

Perhaps you are entering a whole number and expect that to be a
percentage? The percentage would normally be a fraction. One way to to
handle this if you are entering 35 and expect that to find 35% (0.35) is
to divide by 100

Field: Margin %
Criteria: <[Enter pct threshold]/100

A bit more robust is to test the value entered and then divide by 100 if
the entry is greater than 1.

<[Enter pct threshold]/ IIf([Enter pct threshold]>1,100,1)

If those both fail, try telling us a bit more detail about your field.
Is it a number field? What type of number field is it?

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
N

new and learining

thank you John S. the <[Enter pct threshold]/ IIf([Enter pct
threshold]>1,100,1)
worked. thanks so much for you help.

John Spencer said:
Perhaps you are entering a whole number and expect that to be a
percentage? The percentage would normally be a fraction. One way to to
handle this if you are entering 35 and expect that to find 35% (0.35) is
to divide by 100

Field: Margin %
Criteria: <[Enter pct threshold]/100

A bit more robust is to test the value entered and then divide by 100 if
the entry is greater than 1.

<[Enter pct threshold]/ IIf([Enter pct threshold]>1,100,1)

If those both fail, try telling us a bit more detail about your field.
Is it a number field? What type of number field is it?

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

i have a large amout of sales information that i have made in to a query
based report for a database im building. what im trying to do is have
everyting with a [Margin %] less than a % be pulled down to that report. the
trouble im having is i want the user to be able to define what % that is when
they open the report. (someone maybe looking for anything less than 35%,
where as another is looking for anything less than 45%)
i have tried <[Enter pct threshold] but that did not work. any other
suggestions. i am extreamly new at access any help would be great. thanks
 
Top