using parameters

C

c8tz

I have a form which the user selects the BlockNo.

The other information that is entered in the form is :

1) NoOfRecordedTrees - RT
2)NoOfSurroundingTrees - ST

When the BlockNo is entered, a query runs which picks up fertiliser
rates for this Block for all sectors within that block.
With RT and ST - it should do a calculation such that it uses Rate/
sector * (RT+ST) to find how much fertiliser is needed for each sector
in each block.

I would like to add a column to the existing query showing
FertiliserAmt using these parameters. How do I specify them within the
query.

Thanks for your great assistance.
 
K

Klatuu

Create a calculated field in your query. If you are using the query builder,
you would enter this where you would put a field name.

FertiliserAmt: [Rate]/[ sector] *
([Forms]![MyFormName]![RT]+[Forms]![MyFormName]![ST])

If you are hand writing the SQL:
[Rate]/[ sector] * ([Forms]![MyFormName]![RT]+[Forms]![MyFormName]![ST]) As
FertiliserAmt
 
C

c8tz

Create a calculated field in your query. If you are using the query builder,
you would enter this where you would put a field name.

FertiliserAmt: [Rate]/[ sector] *
([Forms]![MyFormName]![RT]+[Forms]![MyFormName]![ST])

If you are hand writing the SQL:
[Rate]/[ sector] * ([Forms]![MyFormName]![RT]+[Forms]![MyFormName]![ST]) As
FertiliserAmt

--
Dave Hargis, Microsoft Access MVP



c8tz said:
I have a form which the user selects the BlockNo.
The other information that is entered in the form is :
1) NoOfRecordedTrees - RT
2)NoOfSurroundingTrees - ST
When the BlockNo is entered, a query runs which picks up fertiliser
rates for this Block for all sectors within that block.
With RT and ST - it should do a calculation such that it uses Rate/
sector * (RT+ST) to find how much fertiliser is needed for each sector
in each block.
I would like to add a column to the existing query showing
FertiliserAmt using these parameters. How do I specify them within the
query.
Thanks for your great assistance.- Hide quoted text -

- Show quoted text -

Thanks heaps for your assistance . It actually was concatenating the
two numbers RT+ST . After changing the text field to number - it
worked fine.

Thanks again.
 

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