Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Location
    Wales
    Posts
    343

    Unanswered: Convert Yes/No ( -1 to positive number)

    Hi guys sorry to put this in - Im sure Ive seen it here before , just cant find it!

    Ive made a survey DB with YES/NO options on click. I need to to calculate counts of yes responses and work % - general thing really. But I cant for the life of me remember of the tip I saw for changing the YES (-1) to a positive (1) Ive set the format to ;/1;0 but that of course is a text protocol

    any quick ideas ?

    Gareth

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    here's a couple of goes:

    my01 = -1*(AccessBooleanTrueFalseValueFromWherever)

    iif(AccessBooleanTrueFalseValueFromWherever, 1, 0)

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Feb 2004
    Location
    Wales
    Posts
    343
    great Izy - thought I saw you on here Ill try and see where we go

    Your a good Un

    G

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    you might save some clock cycles doing a sum() anyway, even though it comes out negative, and then -1* the sum()

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Feb 2004
    Location
    Wales
    Posts
    343
    AAAAAAAAAAAAARRRRRRRRRR Yes indeed - as you said saves the clocking and keeps the function relevant to the area of use

    THANK YOU!

    Gareth

  6. #6
    Join Date
    Feb 2004
    Location
    Wales
    Posts
    343
    Just a note Izzy

    Worked a treat and saves loads of fixes Thanks again

    Gareth

Posting Permissions

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