-----Original Message-----
Hi,
By your answer I hear you say that QueryA, which
calculates Discount:, was working before and now is not
working in some cases. In your post of data samples I see
some values are okay and some are #error. If nothing has
happened to the code for QueryA, and the data base has not
been altered (no query or table or field name changes,
etc.), then I feel there must be a problem with the data
to produce #error for some but not all instances of
Discount:.
If you would and can, please post (or pass me by email)
a sample of QueryA output which displays
Calculated_Charges, Adjusted_Charges, and Discount: which
includes both good and bad results.
This may take a little longer for me to get an exact
picture of your process. If you prefer we can discuss
this outside the user group by e-mail. Mine is
[email protected] - without the ijk. Please
include "Access newsgroup error problem" in the subject
line.
We'll get there - hang in. I'm on Central Daylight Time
and online 8-4:30.
Regards, Howard
-----Original Message-----
Thanks again,
All the things that you wrote is correct; however, having
said that... it was working before, and all the seturn
db/queries started not to dispay the correct data. if
there is anything I can do to fix this problem please
help
me. I'm just new using MS Access. Thanks
-----Original Message-----
Let me see if I have the picture now:
1. You have QueryA that calculates Discount: and
formats the result as "0.###%", and you have another
QueryB that uses QueryA as a recordsource and which
contains the parameter statement asking for the user to
select a discount value.
2. By your other post showing calculation results
(from QueryA?), some calculations return #error.
If this is the correct picture, then I think you
might
have a data problem.
a. Some values of Calculated_Charges may be =0 or
null. Calculated_Charges is a denominator and should
not
=0 or be null. Suggest you print values of
Calculated_Charges to see if this is true in cases where
Discount: = #error. If true, values of
Calculated_Charges
need to be corrected.
b. If a. is true, the FORMAT() function can't
operate
on the #error result correctly.
If none of this helps, then I still may not be seeing
the picture correctly. I'd be glad to stick with the
problem, but you might prefer to start over and seek
help
from others. Let me know what you want to do.
HJ
-----Original Message-----
Good morning to you too,
I have another query which calcultes the discount for
me,
so I'm using other queries to get values; discount
value
etc. from the query that calculates values for me.. So
the
promblem is; I can't use parameter to display certain
value specialy the discount value/s. THANKS
-----Original Message-----
Good morning!
If I read your response correctly, you have a
parameter
statement as a criterion in the calculated Discount:
field, and the Discount: calculation is drawing on
existing values for Calculated_Charges and
Adjusted_Charges.
a. If the above is true, then I don't understand
why
you want the user to input something on top of a
calculation. If you are calculating the discount, it
shouldn't require any additional input.
b. However, if the parameter statement occurs in
another field (perhaps the Adjusted_Charges field?),
then
the statement is incorrectly phrased; " Like [...]
& "*" "
asks for text, and it appears you want the user to
input
a
number. If you want a number input the phrase should
read
simply [Enter a Discount].
Please post back with some clarification of the
above.
I'd like to help you to a satisfactory solution.
hj
-----Original Message-----
Hi,
The field contains calculates percentage of a
discount:
and here is synt. for that field; "Discount: Format
(([Calculated_Charges]-[Adjusted_Charges])/
[Calculated_Charges],"0.###%")"
parameter; Like [Enter a Discount] & "*" .
Also I have query that I'm using for all the queries
that
I'm using... just to avoid duplicate for all
calculated
fields; like calculatd_charges and adjusted_charges..
-----Original Message-----
Hi,
A number of possibilities. Please post back with
the
parameter statement as it currently exists and
explain
what you want the parameter to do.
-----Original Message-----
when I try to run query that conatains premeter
that
asks
user to enter a value, I get this error: "This
expression
is typed incorrectly, or it is too complex to be
evaluated. For example, a number expression may
contain
too many complicated elements. try simplifying the
expression by assigning parts of the expression to
variables"
Any idea how to solf this issue...
.
.
.
.
.
.
.
.