Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Bit fields (Access 2000)

    I have a form and report in which some bit fields appear with 0 or -1 values. How can I get these to appear as "Y" if -1 and blank if 0?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Bit fields (Access 2000)

    Try setting the Format property of the text boxes bound to the Yesa/no fields to ;Y

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Bit fields (Access 2000)

    Try a function like this: =IIF([Appropriate Field Name]=0,"","Y")
    Regards,
    Rudi

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Bit fields (Access 2000)

    Could you explain that Hans. ( ;Y ) Is this a switch of some kind?
    Regards,
    Rudi

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Australia
    Posts
    676
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Re: Bit fields (Access 2000)

    Perfect, thanks again, Hans.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Bit fields (Access 2000)

    No, it's a custom format. From the online help:
    <hr>The Yes/No data type can use custom formats containing up to three sections.

    Section Description

    <table border=0><td>First</td><td>This section has no effect on the Yes/No data type. However, a semicolon ([img]/forums/images/smilies/wink.gif[/img] is required as a placeholder.</td><td>Second</td><td>The text to display in place of Yes, True, or On values.</td><td>Third</td><td>The text to display in place of No, False, or Off values.</td></table><hr>
    In ;Y, the first and third sections are empty, and the second section consists of the character Y. The serves to indicate that Y is to be treated as a literal character, and not as the format code for Year.

  7. #7
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Bit fields (Access 2000)

    Tx.

    Aah... Literal character as in a Mask. I assume you could use ( ;"Y" too!
    Regards,
    Rudi

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Bit fields (Access 2000)

    Yes, but Access will change "Y" to Y automatically <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

Posting Permissions

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