Results 1 to 6 of 6
  1. #1
    Rogue is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    16

    Access Calculations

    Hi, i am just new to access and i want to learn how to apply calculations in access. Currently I have two tables namely:budget & hired. Budget table contains, department,position and number of requirements for each positions, while hired table contains complete listing of hired staffs including respective position and department they were hired. I want to make a query that automatically deducts the positions in hired table from the positions in my budget table. I will really appreciate if someone can help me on this. Thank you in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by 'deduct' - you want to delete a record? Or you want to calculate difference of total count of positions in each table? This requires aggregate (Totals) queries or use of DCount domain aggregate function. Access Help has guidance on both.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Rogue is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    16
    Yeah I mean to calculate difference of total count of positions in each table. Hope you could give me sample how to do it. tnx

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Do an aggregate (Totals) query of the hired table that will count the positions by whatever grouping you prefer. Access Help has guidance on creating Totals query.

    Join that query to the budget table. Create field with expressions that calculate the difference. Or build a report with that query as data source and do calculation in textbox.

    If you want to try creating an all-in-one nested query in the SQL View window, review http://allenbrowne.com/subquery-01.html especially the example for Aggregation: Counts and Totals.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Rogue is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    16
    Tnx for your help, Now I have a query that sums total hired by department and by position. And another query displaying all the vacancies while in another column I want the total hired to be displayed so i tried dlookUp with the following formulas:Hired: DLookUp("[hired]","qry hired","[position]=" & [position]).Wherein "hired" is the column that summarizes all positions hired, "qry hired" is the query name.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why don't you do another query that joins the two data sources on the department and position fields?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculations in a query
    By dichotomous2013 in forum Access
    Replies: 4
    Last Post: 02-19-2013, 06:55 AM
  2. calculations
    By DariusD in forum Access
    Replies: 3
    Last Post: 01-01-2013, 07:22 PM
  3. Calculations on reports
    By BigMac4 in forum Reports
    Replies: 3
    Last Post: 09-14-2012, 02:33 PM
  4. calculations??
    By richrit in forum Access
    Replies: 1
    Last Post: 04-11-2012, 05:06 PM
  5. Calculations in Access
    By dominick in forum Access
    Replies: 0
    Last Post: 07-28-2009, 07:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums