yet another calculated control/query/table problem :(

A

Almost Noobie

hi,
I'm having problems with a calculated control and a field in the table.
What I have is a form with a calculated control (nr_of_teams) that counts
how many radio buttons are "ticked", the radio buttons corresponding to
teams. Also I have a MP (square meters) textbox that is user input. Based on
these two controls I have another one that calculates MP per team.
What i want is a query that has a field with the values of MP / team.
On form this works just fine but I need a query on which i can later base a
report and I can't figure out the code or manner to handle this issue. Please
help and thank you in advance.
 
L

LarryP

If I understand you correctly, you have two controls on a form that exist
ONLY on the form (i.e., the values are not stored in a table somewhere). If
that's correct, you can write a query that grabs those two values off the
form and uses them to do further calculation(s). BUT -- if that's correct,
the query will only run when the form is open and the values have been set.
Because you use the phrase "...on which I can LATER base a report" I suspect
you need to re-engineer your DB so it actually saves the data in a table.
You didn't tell enough for me to comment beyond that.
 
J

John Vinson

On Wed, 3 May 2006 07:49:03 -0700, Almost Noobie <Almost
hi,
I'm having problems with a calculated control and a field in the table.
What I have is a form with a calculated control (nr_of_teams) that counts
how many radio buttons are "ticked", the radio buttons corresponding to
teams. Also I have a MP (square meters) textbox that is user input. Based on
these two controls I have another one that calculates MP per team.
What i want is a query that has a field with the values of MP / team.
On form this works just fine but I need a query on which i can later base a
report and I can't figure out the code or manner to handle this issue. Please
help and thank you in advance.

You should be able to do the calculation as a calculated field in a
Query (rather than in the controlsource of a textbox on a Form), and
then base both your form and your report on this Query. Or, simply
redo the calculation on the Report, rather than using the Form as an
intermediary.


John W. Vinson[MVP]
 

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