Results 1 to 4 of 4
  1. #1
    shexe is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    71

    Alias Help

    Hi,
    I need to create a blank alias for records containing "TBD" in an existing column. I keep creating a new column for this condition by accident. Can anyone provide insight as to how to create a conditional alias without an IIf statement?

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Not sure how did you keep creating new columns. did you use IIF statement?

    Did you use VBA code to create a new column?

  3. #3
    shexe is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Aug 2010
    Posts
    71
    No VBA written in this workbook. Code is below.

    SELECT [Budget Analysis 2011-NEW_Complex].Manager,[Budget Analysis 2011-NEW_Complex].VendorProject,Sum([Budget Analysis 2011-NEW_Complex].Jan) AS January,Sum([Budget Analysis 2011-NEW_Complex].Feb) AS February,Sum([Budget Analysis 2011-NEW_Complex].Mar) AS March,Sum([Budget Analysis 2011-NEW_Complex].Apr) AS April,Sum([Budget Analysis 2011-NEW_Complex].M) AS May,Sum([Budget Analysis 2011-NEW_Complex].Jun) AS June,Sum([Budget Analysis 2011-NEW_Complex].Jul) AS July,Sum([Budget Analysis 2011-NEW_Complex].Aug) AS August,Sum([Budget Analysis 2011-NEW_Complex].Sept) AS September,Sum([Budget Analysis 2011-NEW_Complex].Oct) AS October,Sum([Budget Analysis 2011-NEW_Complex].Nov) AS November,Sum([Budget Analysis 2011-NEW_Complex].Dec) AS December
    FROM[Budget Analysis 2011-NEW_Complex]
    WHERE BudgetWorkbook="BITN306" AND Type="Project Labor"
    GROUP BY[Budget Analysis 2011-NEW_Complex].BudgetWorkbook, [Budget Analysis 2011-NEW_Complex].Manager, [Budget Analysis 2011-NEW_Complex].VendorProject;

    I'd like to create a condition where if Manager is "TBD", TBD reports as a blank (no text).

    The IIf statment I tried (not in code above) created new columns and that isnt what I need.

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I see.

    you can change a little bit in you query as following, then the column name will stay as Manager.

    SELECT iif([Budget Analysis 2011-NEW_Complex].Manager ="TBD","",[Budget Analysis 2011-NEW_Complex].Manager) as Manager, [Budget Analysis 2011-NEW_Complex].VendorProject .....

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

Similar Threads

  1. DocName alias and TransferSpreadsheet
    By thart21 in forum Programming
    Replies: 1
    Last Post: 04-27-2010, 11:11 AM
  2. user alias
    By ukgooner in forum Queries
    Replies: 0
    Last Post: 08-25-2009, 05:03 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