Results 1 to 8 of 8
  1. #1
    Join Date
    May 2002
    Posts
    46

    Unanswered: Dirty event not firing

    I am attempting to capture form changes on two separate forms in my application. I have placed code in the dirty event in both forms - the dirty event fires on one form and not on the second. The only difference in the forms is that one's recordsource is a table and the other a query. The one based on the query is not capturing the event.

    Is this the rule or is something else going on?

    Thanks,
    Brian

  2. #2
    Join Date
    Nov 2002
    Location
    Hillsboro, OR, USA
    Posts
    59

    Re: Dirty event not firing

    Originally posted by bmartin
    ... The one based on the query is not capturing the event.
    And it's an updatable query?

  3. #3
    Join Date
    May 2002
    Posts
    46
    It's a Select query & it is updated from the form.

    Brian

  4. #4
    Join Date
    May 2002
    Posts
    46
    Does anyone know if the Dirty Event can only be used on forms whose recordsource is a Table instead of a Query?

    It looks like forms based on tables are capturing the Dirty Event & forms based on Queries are not. Is there a way around this?

    Thanks,
    Brian

  5. #5
    Join Date
    May 2002
    Posts
    46
    Ok - I'll continue talking to myself. I have found that the Query recordsource doesn't appear to be the issue. I tested on another form with a Query as the recordsource & it works OK. So far, 2 out of 4 forms capture the Dirty event. The forms' attributes are pretty much the same, so I'm stumped as to why it works on 2 and not the other 2.

    Any thoughts as to why Dirty may not be triggered?

    Brian

  6. #6
    Join Date
    May 2002
    Posts
    46
    For anyone who cares! (I've been carrying on this conversation with myself all day) I discovered the problem was with some code in the form's Activate event. I'm not sure why, but when I inserted "Me.Dirty = False" at the end of the Activate subprocedure, the form magically started recognizing the dirty event.

    I'm sure Bill Gates knows about this. But if anyone else runs into this problem, give it a try.

    Brian
    Last edited by bmartin; 12-19-02 at 19:37.

  7. #7
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Good job

    I followed your thread today and give you thumbs up for
    your perserverance.

    Michael

  8. #8
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    you might have been suffering from memory seepage, the value of dirty on one form leaking into the other and a form that is aready dirty can't become dirty
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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