Parameter Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi I'm new to access.
PLEASE help me

Im trying to run a query with an expression that will round the weights in
one field and put the new values in another. I'm using just a basic select
query. When I try to run the Query I get a box saying to "Enter Parameter
Value" for "Ship data w/ short zips!Ship Wgt"

the expression is as follows:

Rounded Weigh: IIf([Ship data w/ short zips]![Ship Wgt]<=0.5,"Ltr",IIf([SP
w/ shortzips and zoned]![weight]>Round([SP w/ shortzips and
zoned]![weight],0),Round([SP w/ shortzips and zoned]![weight],0)+1,Round([SP
w/ shortzips and zoned]![weight])))

If you could help I would really appricate it. Thanks!
 
You need to change your ! to a period. You will need that in all of
your references.

Hope that helps!
 
If Access finds a name in the query that it is not able to resolve, it
assumes the name is a parameter, and pops up the parameter dialog.

So, perhaps something wrong with in the name
[Ship data w/ short zips]![Ship Wgt]
Is there a table named "Ship data w/ short zips"?
Does that table have a field named "Ship Wgt"?
Are the spaces correct?

Once you solve that problem, the next question is what kind of data you want
in this calculated field. For one case, your field will contain the text
"Ltr". It will therefore treat the column as text, not as a number. You will
not be able to perform any math on this column (e.g. to sum the weights in a
report), and it will sort as text (so 2 sorts before 10.) If that matters,
you need to ensure that all cases return a number, not text.
 
1. Avoid at all cost the use of special characters, including spaces, in the
names of fields, tables, forms, and report object names. Just the 123s and
ABCs with the underscore _ being the only exception. If nothing else it
lessens or even eliminates the need for [ ] around everything.

2. You usually should never use data in one field to update data in another
especially in the same table. Instead you should use the proper calculations
to return this derived data as needed in queries, forms, and reports. The
only exception is when you need to save something at a point in time like an
invoice.

Off my soap box and to your question: Is there a table or query called Ship
data w/ short zips? In that table or query is there a field named Ship Wgt?
That's the first thing to check. The spelling must be exact.

You have nested IIf statements which can be trouble. Try simplifying the
query until it works then building it back up one small step at a time until
it either works as you wish or causes an error. Then you'll have a better
idea of the problem.
 
Jeff Allen and Jerry,

Thanks for your help. I was able to figure it out using your advice. Its
great that there are people like you willing to help out others in a forum
like this one. Again, thanks, I appricate you guys taking the time to help me
out.
-Ian
 
Back
Top