enter parameter value

Tech-Archive recommends: Fix windows errors by optimizing your registry



I created a query where I did some calculations and then named the field
(example: pounds: tons*2000). All the fields I created like this cause a
"enter parameter value" prompt to appear. I read that this is because the
query is referencing something it doesn't recognize. How do I fix this? The
SQL statement is as follows:

SELECT tblCrates.Location, tblMaster.Month, tblCrates.[Number of Crates],
tblLactation.[Number of sows farrowed], tblLactation.[Number of litters
weaned], tblLactation.[Average age at weaning], tblMaster.Ingredient, [Number
of sows farrowed]*[Average age at weaning] AS [Lactation Days],
tblMaster.[Volume \ Tons], [Pounds]/[Lactation Days] AS [ADFI Per Lact Day],
([Number of sows farrowed]+[Number of litters weaned])/2 AS [Average Farrowed
and Weaned], tblLactation.[Days per month], [Days per month]*[Number of
Crates] AS [Crate Days], [Pounds]/[Crate Days] AS [ADFI crate days,lb],
([ADFI Per Lact Day]+[ADFI crate days,lb])/2 AS [ADFI,lb], [Volume \
Tons]*2000 AS Pounds, tblLactation.Year
FROM (tblCrates INNER JOIN tblMaster ON tblCrates.Location =
tblMaster.Location) INNER JOIN tblLactation ON (tblMaster.Month =
tblLactation.Month) AND (tblCrates.Location = tblLactation.Location)
GROUP BY tblCrates.Location, tblMaster.Month, tblCrates.[Number of Crates],
tblLactation.[Number of sows farrowed], tblLactation.[Number of litters
weaned], tblLactation.[Average age at weaning], tblMaster.Ingredient, [Number
of sows farrowed]*[Average age at weaning], tblMaster.[Volume \ Tons],
[Pounds]/[Lactation Days], ([Number of sows farrowed]+[Number of litters
weaned])/2, tblLactation.[Days per month], [Days per month]*[Number of
Crates], [Pounds]/[Crate Days], ([ADFI Per Lact Day]+[ADFI crate days,lb])/2,
[Volume \ Tons]*2000, tblLactation.Year
HAVING (((tblMaster.Ingredient)="Lactation" Or
(tblMaster.Ingredient)="gestation"));

Thank you for your help.
.



Relevant Pages

  • Re: enter parameter value
    ... I think the main problem you are referring to is caused by the fact that you are using the name of the calculated field in other calculated ... uses the field Pounds as part of the calculated field but the field Pounds is not aliased in the query until after this, being *2000 AS Pounds. ... I think it will work ok if you were to put the Pounds field before (i.e. to the left in the query design grid) the field, for the sake of the example. ... FROM (tblCrates INNER JOIN tblMaster ON tblCrates.Location = tblMaster.Location) INNER JOIN tblLactation ON AND ...
    (microsoft.public.access.gettingstarted)
  • Re: correlated subquery in the crosstab
    ... FROM (tblStudent INNER JOIN (tblClass INNER JOIN ... values from the outer query and I have made an alias for it. ... I have students, courses, exam groups containing exams of courses, ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: correlated subquery in the crosstab
    ... I solved my problem using stored queries to act as subqueries. ... FROM (tblStudent INNER JOIN (tblClass INNER JOIN ... values from the outer query and I have made an alias for it. ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: correlated subquery in the crosstab
    ... The first query ... TRANSFORM FirstAS FirstOfscore ... FROM tblStudent INNER JOIN (((tblEduYear INNER JOIN tblExamGrp ON ... that the crosstab query in access has much more capablities than ...
    (microsoft.public.access.queries)
  • Re: Matching records for an update query
    ... then the update query would look something like ... UPDATE RegisteredMembers INNER JOIN BusinessChanges ...
    (microsoft.public.access.queries)