Numbers in Microsoft Access
This tip that looking at numbers in Microsoft Access, looks at Whole Numbers . Has there ever been a time when you wish to return how many whole numbers are in a division equation, without the decimals. As an example, how many 6s are there in 32.
If you used the usual Access formula:
then the result would be:
You could try rounding the number or setting the decimal place to display only integers, but both of these may not give you the correct result each time. i.e. it may either round them up or down.
A quick and easy way is to use the following formula:
Note the slash is a back slash instead of the normal forward slash of the division key.
This formula will give you the result of:
Remember, if using this formula in a form or report, add an = sign to the beginning.
Adding Sequential Numbers to a Report
The adding of sequential numbers to a report is the answer to one of the
questions I have received in the past. I have made the assumption that
if one person asks the question then it is likely others also wish to
know the answer to the question.
How do I get serial line numbers to appear on a report in Access?
To add serial (sequential) numbers for a report:
Add an unbound text box to the design section of the report;
Then, open the text box properties (right click and select properties);
Set the following under the Data tab:
Control source '=1'
Running Sum = 'Over Group if you wish to count the records in each group
Running Sum = 'Over All' if you wish to display consecutive numbers for all the records.