Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    34

    Unanswered: Unckg Show box wont help

    I have a database set up that is for testing circuits.
    so line 1 or record 1 consists of the results of 1 test. These circuits may be on (blank) or off (Off).
    SO... record 1 looks like this:


    ………………….Circuit 1…Circuit 2… Circuit 3 …Circuit 4
    Record 1 ………..Missing………………..Off
    Record 2 ………..Off………..Off…………….……… Off
    Record 3 ……………………………………………….Missing

    My Query mirrors the table.
    I want a report that will only tell me the fields that are populated. I don’t want to have any of the labels or the blank spaces on my report.

    Ie….

    Record 1
    Circuit1 MISSING Circuit 3 OFF

    Record 2
    Circuit1 OFF Circuit2 OFF Circuit 4 OFF

    You see how just unchecking the show box on the query will not work for me.
    Last edited by tkacoo; 05-06-04 at 10:01.

  2. #2
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    unchk check box won't work

    Hi tkacoo,

    I have a database with a query and reports like yours. What I have are CheckBoxes for things like WARRANTY, CLOSED and so on. Based on what I have set on my report I would suggest this for yours:
    CkBx-Missing CkBx-Off
    Place your CheckBoxes in the Report and Hide Them..(Properties/Format/Visible=No)
    Place a TextBox on the Report wherever you like and set it's ControlSource to this below:
    Code:
    =IIF([Missing]=True,"MISSING","OFF")
    This will show Missing OR Off, and will cover

    Code:
    =IIF([Missing]=True,'MISSING","")
    This code will show Missing OR nothing at all. This you would set for each CheckBox if you have one two for each line item. Any more than that you will just need to do a full all out IF..THEN..ELSE statement.

    Pick and choose, try them out and see what you get. Hope this helps you out.
    Bud

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    tkacoo,

    Checking to see if you tried it and your results.

    Bud

  4. #4
    Join Date
    Mar 2004
    Posts
    118
    In the query builder you can use immidiate if statements or (iif) as a way to create custom data

    if your in the design view all you have to do is use this synthax on a fresh column

    nameOfExpression: iif([fieldName] = value, true, false)

    iif statements are basicaly boolian (i cant remeber how to spell that) meaning that they only return true or false. You can name true or false anything you like... whatever you put in will display as the field value.

    nameOfExpression can be anything you want the field name to appear as.

    = sign can be any operator <, >, =<, Like, between you get the idea.

    you dont need to put a semicolon at the end of the statement.

    if you are building an SQL string the synthax is slightly different and should appear before the FROM part of the statement:

    iif([fieldName] = value, true, false) AS nameOfExpression

    Note that SQL treats this as a field so dont forget to use commas where nessesary (before and after depending on the situation).

    You can add as many of these fields as you want and reports will treat them as valid fields so you dont need to code anything.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •