• Bound control and check boxes

    • This topic has 5 replies, 4 voices, and was last updated 24 years ago.
    Author
    Topic
    #355792

    Hi,

    I’ve created a form that has several columns that are Yes/No. Presently I have bound control of these boxes to the table they came from, so that any entry to them will be reflected in the table. I would like to make them check boxes on the form, so that the person doing the input just needs to click for Yes or leave blank for No. Could someone please tell me how I would do this to ensure that the entries made on the form are still reflected in the table? I tried replacing the current input boxes with the check boxes, but could not find a method to ensure that they would be bound, so I reverted back to the boxes that require a Yes or No input.

    Thanks for any help.

    Viewing 1 reply thread
    Author
    Replies
    • #525511

      I did a little demo of my own with two fields,

    • #525540

      Is there a reason you want to store the data as yes and no strings instead of the boolean values? It is possible to switch back and forth like that, but it requires unbound controls and code to read and write the field values and set the checkbox to display the appropriate result.

      • #525734

        I want to make the database as easy to use as possible. I am in a situation where I realize that for the uses the department wants to make of the data, a database is the best method of storing the information. I know very little about ACCESS and the rest of the department knows nothing. I would like to create forms, queries and reports with simple instructions so that the others can use it when I am no longer around (on contract).

        I would like to have check boxes on the forms to make data input easier. At the moment my forms require that you type Yes or leave the default No. I have found if I type -1 it will appear as Yes, but that is not something that would make sense to a typical user.

        I was under the impression that it was an option, but perhaps I am mistaken. I know I have seen it in the past, but I think it was in a table. I really don’t want the average user to open the tables. I would rather they do all their input thru forms. Then run whatever queries or reports they require.

        • #525738

          You can handle it much more simply by using a yes/no field, which will allow the user to simply click the checkbox to indicate yes or leave it blank for no. Then your checkboxes on the forms will store the -1 or 0, but the user will always see checkboxes. If you have a yes/no field and make it the control source for a textbox on a form, you can set the display format to show yes/no, true/false, etc.; but it is easier for the user to click on a checkbox than to type in a word.

          • #525746

            I am not sure I understood the thread correctly, but I work with visually impaired people and they cannot see checkboxes, I was forced to use combo boxes so that they could see “Yes”/”No”. Then, I stumbled into this one:

            In table: Set those fields you want to be Yes/No, then in the Properties for those Yes/No fields, click on Lookup tab and change the view to Text.

            Go to your forms and delete the checkboxes and add them again. Access will automatically change them to textboxes and all you need to do is to type “yes” or “no” and it will automatically store -1 (yes) or 0 (no) in the table.

    Viewing 1 reply thread
    Reply To: Bound control and check boxes

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: