Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Calculating percentages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
red skelton - 11 Nov 2005 11:03 GMT
Hi,
I'm having a problem that I was hoping someone might be able to help me out.
I thought it would be straight forward, but what I'm trying to do is this.  I
have two seperate queries, and want the total from query "A" divide by total
from Query "B" and display the results in percentage.  I have tried
everything I could think of but no luck.  Thanks in advace for any help or
suggestions.
VR,
Red
Jeff Boyce - 11 Nov 2005 13:23 GMT
Red

(love the clown skit...)

You didn't mention where you are trying to do this.  If you happen to be
working in a form or a report, could you bring in the results of each query
and add a new control that does the division?

And since we don't have a clue about your underlying data/structure, it will
be tough to see if there's another way to pull what you're after...

Signature

Regards

Jeff Boyce
<Office/Access MVP>

> Hi,
> I'm having a problem that I was hoping someone might be able to help me out.
[quoted text clipped - 5 lines]
> VR,
> Red
red skelton - 11 Nov 2005 13:42 GMT
Thanks Jeff, (Wish it was me doing the clown skit sometimes LOL)
What I wanted to do was do the division via a seperate query.  If I have
query "a" total = 20people and query "b" total = 100people then create a
seperate query "c" used to divide the two totals to come up with a % and use
this % in a text box on a report.  Hope this makes sense.
Thanks
Red  

>Red
>
[quoted text clipped - 12 lines]
>> VR,
>> Red
Jeff Boyce - 11 Nov 2005 14:46 GMT
Red

Not sure I understand your data yet.  Are you saying that you have one
table, and two "samples" (a query of 20 and a query of 100)?

Is there any way these two samples (queries) are related to each other in
your data?  For example, all did something on the same day, so you could use
the date to pull them together into one query?

If you are using a report, a "brute force" method might be to use the
results of one query in a "main report", and the results of the second query
in a sub-report.  Then you could add a control to your report and set the
ControlSource to something like:
   =[FirstQuery'sValue]/[SecondQuery'sValue]

Watch out for /0 issues!

Signature

Regards

Jeff Boyce
<Office/Access MVP>

> Thanks Jeff, (Wish it was me doing the clown skit sometimes LOL)
> What I wanted to do was do the division via a seperate query.  If I have
[quoted text clipped - 20 lines]
> >> VR,
> >> Red
red skelton - 11 Nov 2005 15:03 GMT
Jeff, thanks for your advice.  I've got to go now and wont be back til Mon.
I'll work on it again then.  Dont want you to think I've ignored you cuz its
much appreciated.  Have a good week end.
Red

>Red
>
[quoted text clipped - 18 lines]
>> >> VR,
>> >> Red
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.