Results 1 to 3 of 3
  1. #1
    Boukmn is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    2

    Trying to Generate Calculated Fields in a Query

    I am trying to generate calculated fields in a Microsoft access 2007 database Query. The main part of the query are two fields: [Account Number] and [Type]. The [Type] field has values ether "Call Outbound" or "Web Profiling". I need to generate two new fields called "Call Outbound" and "Web Profiling" that will have the list the values from the [Type] field based on the [Account Number].



    This is what I want the Query results to look like below. The calculated fields are italic:

    Account Number Month QTR Type Call Outbound Web Profiling
    STRAT-00078 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00180 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00236 5/5/2012 Q2 Call Outbound Call Outbound
    STRAT-00324 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00406 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00459 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00469 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00492 5/5/2012 Q2 Call Outbound Call Outbound
    STRAT-00636 5/5/2012 Q2 Call Outbound Call Outbound
    STRAT-00637 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00768 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00812 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00871 5/5/2012 Q2 Call Outbound Call Outbound
    STRAT-00968 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-00987 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01013 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01028 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01029 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01074 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01155 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01164 5/5/2012 Q2 Web Profiling Web Profiling
    STRAT-01293 5/5/2012 Q2 Call Outbound Call Outbound
    STRAT-01313 5/5/2012 Q2 Web Profiling Web Profiling


    Please help!

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    In a new field, type: Call Outbound: IIF([Type]="Call Outbound","Call Outbound",Null)
    In your second new field type: Web Profiling: IIF([Type]="Web Profiling","Web Profiling",Null)

    Alan

  3. #3
    Boukmn is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    2
    It worked! :-)

    Thanks, Alan! you-d-man! :-D

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

Similar Threads

  1. Query Date Range Based on Calculated Fields
    By wilsoa in forum Queries
    Replies: 6
    Last Post: 03-08-2012, 02:41 PM
  2. Calculated fields
    By Madmax in forum Forms
    Replies: 1
    Last Post: 06-17-2011, 08:36 AM
  3. Replies: 1
    Last Post: 05-04-2011, 03:51 PM
  4. calculated fields
    By nashr1928 in forum Forms
    Replies: 1
    Last Post: 07-21-2010, 04:49 PM
  5. Sum of calculated fields
    By nkuebelbeck in forum Forms
    Replies: 9
    Last Post: 03-12-2010, 01:32 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