query for quotient

  • Thread starter Thread starter chase
  • Start date Start date
C

chase

Can anyone please tell me how to get my query to work. I
have set it up as follows:

(column 1) (column 2) (column 3)
(desired results)
field [A] C: [A]/

table table name table name table name

After I close the query and open the table, nothing
appears in column 3. What am I doing wrong?

Thanks.
 
Chase, the results do not belong in the table.
Use the query to get the results whenever you need them.
You should not have column 3 in your table.

If you want to force the results into your table, you can change the query
into an Update query (Update on Query menu in query design view), and place
the expression:
[A]/
in the Update row under column C.

However, it is then your responsibilty to ensure that any new records also
get the value placed into column C, and that any changes to A or B in any
row cause the correct update to column C. You will need to do this
programmatically, in the events of your forms, and make sure that no changes
are ever made except through those forms, or through code that guarantees
the correct update to C. Why bother with all that when you can be guaranteed
of the right answer in the query?
 
Get rid of the [table name] in the "Table" row and 3rd Column in your Query
Grid, i.e. the "Table" cell just underneath the Calculated Field C:[A] /
should be blank.
 
Allen, thanks for the specific instructions. I was able
to force the results into the table. How do I instruct
the query to round the quotient to the nearest whole
number?
Thanks for your help. Is it sunny in Australia today?
-----Original Message-----
Chase, the results do not belong in the table.
Use the query to get the results whenever you need them.
You should not have column 3 in your table.

If you want to force the results into your table, you can change the query
into an Update query (Update on Query menu in query design view), and place
the expression:
[A]/
in the Update row under column C.

However, it is then your responsibilty to ensure that any new records also
get the value placed into column C, and that any changes to A or B in any
row cause the correct update to column C. You will need to do this
programmatically, in the events of your forms, and make sure that no changes
are ever made except through those forms, or through code that guarantees
the correct update to C. Why bother with all that when you can be guaranteed
of the right answer in the query?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Can anyone please tell me how to get my query to work. I
have set it up as follows:

(column 1) (column 2) (column 3)
(desired results)
field [A] C: [A]/

table table name table name table name

After I close the query and open the table, nothing
appears in column 3. What am I doing wrong?

Thanks.



.
 
Use the Round() function.

Example to round to 2 decimal places:
Round([A]/, 2)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Chase said:
Allen, thanks for the specific instructions. I was able
to force the results into the table. How do I instruct
the query to round the quotient to the nearest whole
number?
Thanks for your help. Is it sunny in Australia today?
-----Original Message-----
Chase, the results do not belong in the table.
Use the query to get the results whenever you need them.
You should not have column 3 in your table.

If you want to force the results into your table, you can change the query
into an Update query (Update on Query menu in query design view), and place
the expression:
[A]/
in the Update row under column C.

However, it is then your responsibilty to ensure that any new records also
get the value placed into column C, and that any changes to A or B in any
row cause the correct update to column C. You will need to do this
programmatically, in the events of your forms, and make sure that no changes
are ever made except through those forms, or through code that guarantees
the correct update to C. Why bother with all that when you can be guaranteed
of the right answer in the query?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Can anyone please tell me how to get my query to work. I
have set it up as follows:

(column 1) (column 2) (column 3)
(desired results)
field [A] C: [A]/

table table name table name table name

After I close the query and open the table, nothing
appears in column 3. What am I doing wrong?

Thanks.



.
 
Back
Top