• Yes/No, 0 or 1 in VB6 to Access (Access 2000, VB6)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Yes/No, 0 or 1 in VB6 to Access (Access 2000, VB6)

    Author
    Topic
    #364677

    I have an mdb that has a field called “active”. It is a yes/no field. In vb6 I have a form that has a checkbox. for the field active called chkActive I don’t seem able to populate the “active” field in my access database when i click my cmdSubmit button on the form.

    cmdSubmit_click()
    chkActive.Value = rsProj!Active

    and when i show the rows on my form it will not show the checkbox on or off.

    rsProj!Active = chkActive.Value

    Thank you for any assistance you can give me.

    Viewing 0 reply threads
    Author
    Replies
    • #560991

      False is 0 (zero), True is -1.

      It sounds like you do not have the form linked to the table. You need to go the the design view of the form and open the Properties window. The Record Source for the form can be selected from a drop-down list, which should include your table. Once that is done, highlight the check box and select the Active field as the Control Source.

      If the form is linked, you do not need any code to update the values of the underlying table fields, it just happens. If you don’t want to link the form to the table, you will need to do some more complex coding for your button to find and update the right record in your table.

      Cheers,

      Rob

    Viewing 0 reply threads
    Reply To: Yes/No, 0 or 1 in VB6 to Access (Access 2000, VB6)

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

    Your information: