Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Division Calculation in a report 1

Status
Not open for further replies.

ashmanuk

Technical User
Aug 5, 2004
23
0
0
US
Hi there quite a simple question really:

I have got a report which displays the value of a field in months. This needs to be shown in years however. Quite simply I just need to know what the code is that you put in the control source of the field to make a division calculation. (As in divide the value by 12 to get years)

Thanks for any help!
 
First, if the field on the form is based on a field on a table, you need to change the name of the field it self. Then you can put something like this:

Code:
=[Fieldname].text/12
 
The field is from a query. I have already tried somthing similar to this and my latest attempt is =[fieldname]/12 (similar to what you suggested!). This does not work though!

Any other ideas?!

Thanks
 
No, why would I need to do this?

Thanks
 
The report displays #Error in the field in question.
 
That is your answer. Change the name of the field on the form, not on the table, just on the form.
 
If I do that though then the report does not know where to get the data from for that field. It comes up with a diolog box requesting the parameters for the renamed field.

Sorry if I am getting the wrong end of the stick!?

Also the data that is being displayed in this report is from a query not a table.

Thanks
 
Cheers mate that has got it going.

If you dont mind me asking though, how did that solve the problem?

Thanks for your help
 
Access has this funny problem of not working when you change the source to a calculation and leave the field name the same, it will give an error. Just a goofy wierdness of the Access.
 
Oh right! Well its good that you have told me about that one its had me stumped for a while! Thought i was going loopy!

Cheers for that mate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top