Results 1 to 3 of 3
  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 created a query based on a table that is linked from an SQL server and that includes a couple of bit fields. I have set the format of the bit fields as "Yes/No" in Access, with their display controls as Text Box for one field (as it only needs to be displayed) and Check Box for the other (as it needs to be updatable). I have also created a form based on the query (so that display-only fields can be locked ).

    1. When I first ran the query, the bit fields were displayed correctly (as "Yes/No" for one and as a check box for the other), but now they sometimes are displayed incorrectly; e.g., as "0/-1" for one and as "Yes/No" for the other, although when I check the properties they haven't changed, and when I re-run the query the fields are displayed correctly again. How can I stop these fields losing their formatting?

    2. Both bit fields are displayed as "Yes/No" on the form. How can I convert one of these into a check box as on the query? Also, is there a way to make a "Yes/No" field accept just "Y/N"?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Bit fields (Access 2000)

    One of the strong recommendations you will hear from most developers is that you don't let users see anything but forms and reports - but in any case, you would probably be best off using an actual Format() function to get the display correct in the query. In the form you can specify what kind of control you want - a check box is one of those - simply pick the field name from the field list, select the check box button on the toolbox, and then click and draw where you want the check box on the form. One caution when dealing with linked SQL Server tables - make sure that you don't have a situation where the field is allowed to be Null - that can cause considerable grief in Access.
    Wendell

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

    Re: Bit fields (Access 2000)

    Thanks for your tips. All fixed now. (I had already encountered and fixed the null SQL bit field glitch.)

Posting Permissions

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