Results 1 to 4 of 4
  1. #1
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Subform records updating immediately (A2002 (SP-2))

    I have two tables A & B linked by a linking table L.

    I have a form with a combo box and 2 subforms. Subform 1 shows the fields from Table B that match the combo box selection. Subform 2 shows the fields from Tables A and L that are linked to the current record on Subform 1. (The master fields for Subform 2 are actually the combo box and a hidden textbox on the main form that tracks one of the fields in Subform 1.)

    Everything works fine (and has for many years, since Access 2.0), but there's one bit of strange behavior that is now getting in the way of some supplemental functionality I'm trying to add to Subform 2. The strange behavior is this: Every time I change the value of any field in Subform 2 and move to another field in the same record, the entire record updates automatically (and the "dirty" indicator in the Record Selector switches from the pencil back to the arrrow).

    If the field I've changed is a checkbox (the one I'm actually concerned about), simply changing the value triggers the record update without any further keystroke to move to one of the other fields. If I watch the Record Selector as I click on the checkbox, I can see it quickly flash to the pencil symbol and then back to the arrow.

    Although there is a little bit of code behind the form, the same behavior happens if I comment it all out, so I'm pretty sure it isn't one of my event procedures that is somehow indirectly causing the update.

    Anyone know what can cause a subform record to update every time you update one of the controls (even though you haven't moved to a different record)?

    (In case it matters, the database is in Access 2000 format.)

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Subform records updating immediately (A2002 (SP-2))

    Is the checkbox the last control in the tab index? If it is and if the form cycle is set to Next Record, then changing a value in that checkbox may trigger an update.
    Charlotte

  3. #3
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Subform records updating immediately (A2002 (SP-2))

    No, the checkbox is in the middle. And I get the same instant-update behavior when I change the value of one of the text boxes and tab to the next field (still in the same record). And in either case the focus remains on the same record after the update.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Subform records updating immediately (A2002 (SP-2))

    Then you'll have to post a stripped down version of the database so we can see what it's doing. Only include the tables, forms, queries, macros and code that apply to the problem and pare down the records in the tables so there's just enough to demonstrate the error. Make sure you remove any sensitive information or post dummy records. If you have trouble getting the zipped file down to the 100Kb size limitation on attachments, post back.
    Charlotte

Posting Permissions

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