Calculation

  • Thread starter Thread starter Rudi
  • Start date Start date
R

Rudi

Hello. I have a question regarding calculations in a report.

Here is my situation: I have a table named User that contains all of my
User information (User_ID, Name, ..., Marital_status). A user can be
single, married, ... I have created (with the help of some good people,
here at the ms.public.access.reports google group:
http://groups.google.com/group/micr...s/browse_thread/thread/27af44866d2758f8?hl=sl)
a query that counts the number of single users, married users, ...
SELECT Users.Marital_status, Count(Users.User_ID) AS CountOfUser_ID
FROM Posta
GROUP BY Users.Marital_status;

and I have transfered this info to a report.

Now I would like to make a calculation on my report. I would like to
divide the number of single and the number of married users. And I
would like to have this result on the same report I have allready
created.

Any easy way to do this?


Thank you

Rudi
 
Open your report in design view. Click on the textbox that is used to
display your total, press CNTRL C and then CNTRL V to copy and paste the
item. Click on the copy and drag to your desired location. Right click it
and select properties. Click in the Control Source and at the very left type
an equal sign and open parenthesis. Move the cursor to the end and type a
closing parenthesis, a forward slash, and the divisor number. Save.
 
Hi. Thank you for replying.

The suggested solution would work if the divisor was a constant.
Unfortunately both of the numbers that I would like to divide are
displayed by the same textbox. My query counts the number of singel and
married users. My report displays only:

Singel user: 10
Married user: 5

For this my report has only 2 TextBoxes . One displays the type of
Marital state (Singel user, Married user). The other one displays the
count of records with the perticular marital state (10, 5). Now I want
to divide the singel users from the married: 10 / 5.

Any idea how to do that?

Thank you
Rudi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top