Results 1 to 2 of 2
  1. #1
    finditsol is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    2

    Compare two fields!

    hi everybody,

    I know few about access, hope to receive more helps from you all!

    I have two TABLES/FORMS named "08BCTC" and "09BCTC" with the same field as ID | QUATER | INCOME | TAX |

    After ENTER data in field INCOME in form "09BCTC", I want to solve these problems

    + To compare the INCOME at current quater with previous quater (in the same table). If found no data of previous quater, alert "No data"

    + And the current quater with last year quater at the same period by comparing with data in TABLE "08BCTC". If found no data, alert "No data"

    + And in form "09BCT" showing its accumulative income up-to-date.



    Here is the result I want

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    You need to build a temporary table stacking data via multiple queries with each Qtr data going in separate columns. That way you can compare quarters on a single row on a form or report, e.g.

    TemporaryTable
    ID
    Qtr
    LastQtrIncome
    CurrentQtrIncome
    LastYearQtrIncome
    Tax

    Query1 - append CurrentQtr data to table
    Query2 - append LastQtr data to table
    Query3 - append LastYearQtr data to table
    Query4 - sum the columns by grouping (Click the "sigma" icon and select "sum" on each column, except ID & Qtr colkumns, on the grouping row of the query. Performs calculations in form control recordsource as required.

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

Similar Threads

  1. Compare msaccess data
    By dref in forum Queries
    Replies: 10
    Last Post: 05-14-2010, 05:35 AM
  2. Replies: 1
    Last Post: 02-03-2010, 09:17 PM
  3. Replies: 0
    Last Post: 08-01-2009, 12:43 PM
  4. report to compare projects' targets
    By Arest in forum Reports
    Replies: 0
    Last Post: 07-29-2009, 09:04 AM
  5. Compare date in a sql query
    By access in forum Forms
    Replies: 2
    Last Post: 06-17-2009, 12:57 PM

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