Thanks for your help Dirk.
The Form_Dirty event wasn't firing because I had code in the Form_Activate
event that set the value of one the text boxes on the form. I have moved
this code to another event and now it's fine - nice and dirty!
thanks again
regards
Richard
> Thanks for your help Dirk.
> The Form_Dirty event wasn't firing because I had code in the
> Form_Activate event that set the value of one the text boxes on the
> form. I have moved this code to another event and now it's fine -
> nice and dirty!
Oh, yeah. Now that you mention it, I remember that he form's Dirty
event doesn't fire if you have already dirtied it programmatically. It
only fires, as I now recall, if the form becomes dirty as a result of
user action. If the form has already been dirtied by code, that can't
happen.
Sorry, I was late remembering that.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Paul - 09 Oct 2006 08:28 GMT
I'd be interested to find out what event you moved your code to that would
cause the on dirty event to fire and what version of access you are using.
i have done extensive testing side by side today with access 2000 and access
2003 and have been unable to get an access 2003 forms on dirty event to fire
with vba code (the form is not dirty before the code modifies the data but is
after the data is modified, yet the event does not fire).
It does fire with access 2000 however.
> > Thanks for your help Dirk.
> > The Form_Dirty event wasn't firing because I had code in the
[quoted text clipped - 9 lines]
>
> Sorry, I was late remembering that.
Marshall Barton - 09 Oct 2006 17:47 GMT
Sheesh, how many threads did you start with this question?
It is near impossible to keep track of a train of thought
when it fragmented across multople groups and threads.
I just remembered that there is a way to trigger the usual
events. If you set a text or combo box's Text property
instead of its Value property, the events are triggered the
same as for user input.

Signature
Marsh
MVP [MS Access]
>I'd be interested to find out what event you moved your code to that would
>cause the on dirty event to fire and what version of access you are using.
[quoted text clipped - 20 lines]
>>
>> Sorry, I was late remembering that.