Results 1 to 3 of 3

Crosstab query (converting bolean values)

  1. #1
    skydivetom is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019

    Wink Crosstab query (converting bolean values)


    I kindly request your assistance with creating a more meaningful crosstab query. Attached MDB (in zipped format) contains the following:

    1. tblSource

    -- [Billet]... arbitrary data for demo purposes only
    -- [Type]... arbitrary data for demo purposes only
    -- [Active]... data type is set to "Boolean value (y/s)" where Yes (-1) = active; No (0) = inactive

    2. qrySource... a simple GroupBy query based on [tblSource]

    3. xqrySource... my crosstab query (this is where I need some help)

    In the cross tab query output, the (-1) and (0) Boolean values of field [Active] are listed as field headers. Field headers of "-1" and "0" are not meaningful whatsoever. Thus, somehow, I'd like to have some conversion mechanism which then displays the headers as "Active" (currently "-1") and "Inactive" (currently "0").

    Could anyone provide me some insights as to how I can accomplish this?

    Thank you,
    Attached Files Attached Files

  2. #2
    Ajax is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    instead of using the field value as the column header use a calculated value

    e.g. iif([Active],"Active","Inactive")

  3. #3
    skydivetom is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Ajax - perfect... worked like a charm!!
    Thousand thanks!

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

Similar Threads

  1. Concat field values in crosstab query?
    By stalk in forum Queries
    Replies: 5
    Last Post: 05-10-2019, 12:28 PM
  2. Crosstab Query Showing Null Values
    By equestrian in forum Queries
    Replies: 2
    Last Post: 09-22-2015, 03:24 AM
  3. CrossTab Query - Blank Values
    By bullwinkle55423 in forum Queries
    Replies: 4
    Last Post: 07-17-2013, 01:59 PM
  4. Crosstab Query Values Export as Text
    By Paul H in forum Queries
    Replies: 0
    Last Post: 01-07-2013, 11:18 AM
  5. How to sum values in Crosstab query?
    By Buakaw in forum Queries
    Replies: 3
    Last Post: 03-22-2011, 01:21 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
Tech Forums: Microsoft Office Forums