By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,255 Members | 1,701 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,255 IT Pros & Developers. It's quick & easy.

Reports with percentage

P: n/a
Hello to all,
Access 2000
I have 2 fields on my report and I want to know the percentage of both
fields. I tried something like this and it gives me ERROR in the
SalesPercentage textbox,

txtSalesPercentage
controlSource = [totalsales] / [numberofsales]

Example

Dept TotalSales NumberofSales
SalesPercentage
101 231 5
???

Dept TotalSales NumberofSales
SalesPercentage
1092 231 5
???

Dept TotalSales NumberofSales
SalesPercentage
234 231 5
???

thanks for any help.
lenny

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
KEVIN97810 wrote:
Hello to all,
Access 2000
I have 2 fields on my report and I want to know the percentage of both
fields. I tried something like this and it gives me ERROR in the
SalesPercentage textbox,

txtSalesPercentage
controlSource = [totalsales] / [numberofsales]
Is it
controlSource = [totalsales] / [numberofsales]
Or
controlSource = =[totalsales] / [numberofsales]

The first character in the control source should be an equal sign.

Example

Dept TotalSales NumberofSales
SalesPercentage
101 231 5
???

Dept TotalSales NumberofSales
SalesPercentage
1092 231 5
???

Dept TotalSales NumberofSales
SalesPercentage
234 231 5
???

thanks for any help.
lenny

Nov 13 '05 #2

P: n/a
ke********@aol.com (KEVIN97810) wrote in message news:<20***************************@mb-m26.aol.com>...
Hello to all,
Access 2000
I have 2 fields on my report and I want to know the percentage of both
fields. I tried something like this and it gives me ERROR in the
SalesPercentage textbox,

txtSalesPercentage
controlSource = [totalsales] / [numberofsales]

Example

Dept TotalSales NumberofSales
SalesPercentage
101 231 5
???

Dept TotalSales NumberofSales
SalesPercentage
1092 231 5
???

Dept TotalSales NumberofSales
SalesPercentage
234 231 5
???

thanks for any help.
lenny


Lenny,

I suppose the problem is caused by the datatypes you tried to display
in the report. Percentages do need a datatype like floating-point. If
calculated in a SQL-statement it can be necessary to convert at least
one of the fields to double cdbl(totalsales) to get a useful datatype
that can be formatted as percentage by the reporter.

Marc
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.