report sample question

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

I downloaded rptsampl00 to look at samples.Question: check number has
control source of =1. I don't get what is happening to cause that to
increment for each check. ?? Also, I saw reference to function CCUR. That
does not show up in help. What is that and why isn't it in help?
thanks.
 
Q.1 "=1"
Open the report in design view.
Right-click the check box and choose Properties.
The Running Sum property (Data Tab) is set to Over Group.
This means that the box keeps a running sum by adding the current value to
the previous total. Since the current value is always 1, it acts as a row
counter.

In general, this would not be an adequate way to store a check number: since
it counts rows, they change if the report is filtered or sorted differently,
whereas I would imagine that you would want your check number to remain
constant. As a result, you would be better served to store the check number
in your form, as per your other post.

Q2 CCur()
This is a type conversion function: Convert-to-Currency.
Access has one of these functions for each data type, e.g.:
- CDate = convert to Date;
- CLng = convert to Long;
- CStr = convert to String;
- CDbl = conver to Double.
Please note that none of these data types can handle the Null value, so you
may need to use Nz() as well, e.g.:
WholeNumber: CLng(Nz([MyField], 0))
 
Thank you. I did find CCUR in help. It would not come up with search but was
under functions. I guess you have to really look for it.
rob
Allen Browne said:
Q.1 "=1"
Open the report in design view.
Right-click the check box and choose Properties.
The Running Sum property (Data Tab) is set to Over Group.
This means that the box keeps a running sum by adding the current value to
the previous total. Since the current value is always 1, it acts as a row
counter.

In general, this would not be an adequate way to store a check number: since
it counts rows, they change if the report is filtered or sorted differently,
whereas I would imagine that you would want your check number to remain
constant. As a result, you would be better served to store the check number
in your form, as per your other post.

Q2 CCur()
This is a type conversion function: Convert-to-Currency.
Access has one of these functions for each data type, e.g.:
- CDate = convert to Date;
- CLng = convert to Long;
- CStr = convert to String;
- CDbl = conver to Double.
Please note that none of these data types can handle the Null value, so you
may need to use Nz() as well, e.g.:
WholeNumber: CLng(Nz([MyField], 0))

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

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

rob p said:
I downloaded rptsampl00 to look at samples.Question: check number has
control source of =1. I don't get what is happening to cause that to
increment for each check. ?? Also, I saw reference to function CCUR. That
does not show up in help. What is that and why isn't it in help?
thanks.
 
Back
Top