Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Thanked 1 Time in 1 Post

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

    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.

    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.

  2. #2
    New Lounger
    Join Date
    Dec 2001
    Melbourne, Australia
    Thanked 0 Times in 0 Posts

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

    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.



Posting Permissions

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