Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246

    Unanswered: Immediate update of check boxes

    Hi,
    I have a form and on it is an option group of 2 choices. The form is continuous and filtered form another form. The option group is 2 check boxes and what I want to do is as soon as the user clicks on the option, the system to update the underlying table. At present it only does this if I leave the record by clicking on another record, this isn't good enough. I can't seem to assign either a macro or code to the "on mouse down event", I get a message "You can't assign a value to this object".

    Anyone got any ideas.

    cheers
    John

  2. #2
    Join Date
    Jan 2004
    Posts
    184

    Re: Immediate update of check boxes

    Use the OnClick event of the Check Boxes
    In abundance of water only the fool is thirsty. Bob Marley.

  3. #3
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246
    Hi,
    The check box option don't have a "onclick" option available

    Regards
    John

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Immediate update of check boxes

    Originally posted by Sticker
    Hi,
    I have a form and on it is an option group of 2 choices. The form is continuous and filtered form another form. The option group is 2 check boxes and what I want to do is as soon as the user clicks on the option, the system to update the underlying table. At present it only does this if I leave the record by clicking on another record, this isn't good enough. I can't seem to assign either a macro or code to the "on mouse down event", I get a message "You can't assign a value to this object".

    Anyone got any ideas.

    cheers
    John
    Is your combobox in the form header or is it a row in the detail section?

    See my link to the same question with no answer....

    http://www.dbforums.com/showthread.p...t=Force+update

  5. #5
    Join Date
    Jan 2004
    Posts
    184
    Hello John,

    I just opened Access, added a checkbox to the form, went to the code window and selected the check box, I got the default sub with the click event:

    Private Sub Check9_Click()

    End Sub
    In abundance of water only the fool is thirsty. Bob Marley.

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by rami.haddad
    Hello John,

    I just opened Access, added a checkbox to the form, went to the code window and selected the check box, I got the default sub with the click event:

    Private Sub Check9_Click()

    End Sub
    Rami,

    This doesn't help if the combobox is part of the detail of a continuous forms form ... Right now until you move off that record changes are not written ...

  7. #7
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246
    Hi Guy's
    My option group/check boxes are in the main body of the form.

    If I add just a check box I get the on click event, but when the check boxes are part of an option group the on click event doesn't appear?

    Regards
    John

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by Sticker
    Hi Guy's
    My option group/check boxes are in the main body of the form.

    If I add just a check box I get the on click event, but when the check boxes are part of an option group the on click event doesn't appear?

    Regards
    John
    John,

    "Main Body" of the form? There is form header, detail, and form footer sections where is it located? Is this form a "continuous forms" form? If the combobox is not part of the detail section and affects the query then you need merely to reconstruct the query and Requery ...

  9. #9
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246
    Hi Mike
    Sorry for the delay in replying, been off ill for a few days.

    In answer to your last question, The option group is in the Detail section and ot is a continuous form. Not certian where the combo box comes into it (probably me being thick )

    Regards
    John

  10. #10
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Originally posted by Sticker
    Hi Mike
    Sorry for the delay in replying, been off ill for a few days.

    In answer to your last question, The option group is in the Detail section and ot is a continuous form. Not certian where the combo box comes into it (probably me being thick )

    Regards
    John
    John,

    See my response to Rami ... Since the combobox(s) in question ARE in the Detail Section AND the form is a continuous form, the checking/unchecking of the combobox(s) do not get updated to the underlying table/query until you either move to another record OR force the write by clicking on the record selector ( the little "pencil") ... I have not found a way (yet) to force the write thru code ...

  11. #11
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246
    Thanks Mike for your help
    Regards
    John

Posting Permissions

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